1
0
mirror of https://github.com/danog/code-server.git synced 2024-12-17 11:47:02 +01:00
code-server/ci/build/build-static-release.sh
Anmol Sethi bc453b5f0d
Switch to a single job to build the npm package
The architecture specific jobs pull it in and then build releases.

Much faster!
2020-05-08 00:09:24 -04:00

26 lines
663 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
main() {
cd "$(dirname "${0}")/../.."
source ./ci/build/lib.sh
rsync "$RELEASE_PATH/" "$RELEASE_PATH-static"
RELEASE_PATH+=-static
# 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"
rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server"
rsync "$node_path" "$RELEASE_PATH/lib/node"
cd "$RELEASE_PATH"
yarn --production
}
main "$@"