mirror of https://github.com/coder/code-server.git
31 lines
764 B
Bash
Executable File
31 lines
764 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
main() {
|
|
cd "$(dirname "${0}")/../.."
|
|
|
|
source ./ci/lib.sh
|
|
|
|
rsync "$RELEASE_PATH/" "$RELEASE_PATH-standalone"
|
|
RELEASE_PATH+=-standalone
|
|
|
|
# We cannot find the path to node from $PATH because yarn shims a script to ensure
|
|
# we use the same version it's using so we instead run a script with yarn that
|
|
# will print the path to node.
|
|
local node_path
|
|
node_path="$(yarn -s node <<< 'console.info(process.execPath)')"
|
|
|
|
mkdir -p "$RELEASE_PATH/bin"
|
|
mkdir -p "$RELEASE_PATH/lib"
|
|
rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server"
|
|
rsync "$node_path" "$RELEASE_PATH/lib/node"
|
|
|
|
chmod 755 "$RELEASE_PATH/lib/node"
|
|
|
|
pushd "$RELEASE_PATH"
|
|
npm install --unsafe-perm --omit=dev
|
|
popd
|
|
}
|
|
|
|
main "$@"
|