mirror of
https://github.com/coder/code-server.git
synced 2025-07-30 05:22:04 +08:00
Allow specifying the target
You still must build on the target system though because of the native Node modules.
This commit is contained in:
@ -3,6 +3,7 @@ set -euo pipefail
|
||||
|
||||
# Build using a Docker container.
|
||||
function docker-build() {
|
||||
local target="${TARGET:-}"
|
||||
local image="codercom/nbin-${target}"
|
||||
if [[ "${target}" == "linux" ]] ; then
|
||||
image="codercom/nbin-centos"
|
||||
@ -23,7 +24,7 @@ function docker-build() {
|
||||
|
||||
function docker-exec() {
|
||||
local command="${1}" ; shift
|
||||
local args="'${vscodeVersion}' '${codeServerVersion}'"
|
||||
local args="'${vscodeVersion}' '${codeServerVersion}' '${target}'"
|
||||
docker exec "${containerId}" \
|
||||
bash -c "cd /src && CI=true yarn ${command} ${args}"
|
||||
}
|
||||
@ -54,7 +55,6 @@ function main() {
|
||||
local codeServerVersion="${VERSION:-}"
|
||||
local vscodeVersion="${VSCODE_VERSION:-}"
|
||||
local ostype="${OSTYPE:-}"
|
||||
local target="${TARGET:-}"
|
||||
|
||||
if [[ -z "${codeServerVersion}" ]] ; then
|
||||
>&2 echo "Must set VERSION environment variable"; exit 1
|
||||
@ -65,7 +65,6 @@ function main() {
|
||||
fi
|
||||
|
||||
if [[ "${ostype}" == "darwin"* ]]; then
|
||||
target=darwin
|
||||
local-build
|
||||
else
|
||||
docker-build
|
||||
|
Reference in New Issue
Block a user