mirror of
https://github.com/danog/code-server.git
synced 2024-12-02 09:38:32 +01:00
da03a648c2
* fix: update npm-postinstall.sh script Add --legacy-peer-deps to deal with weird npm issue with vscode dependencies. See: https://stackoverflow.com/a/66620869/3015595 * fix: use npm in release-standalone * chore: update package.json * chore: bump plugin engine for tests
36 lines
1.0 KiB
Bash
Executable File
36 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# This is due to an upstream issue with RHEL7/CentOS 7 comptability with node-argon2
|
|
# See: https://github.com/cdr/code-server/pull/3422#pullrequestreview-677765057
|
|
export npm_config_build_from_source=true
|
|
|
|
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"
|
|
|
|
ln -s "./bin/code-server" "$RELEASE_PATH/code-server"
|
|
ln -s "./lib/node" "$RELEASE_PATH/node"
|
|
|
|
pushd "$RELEASE_PATH"
|
|
npm install --unsafe-perm --omit=dev
|
|
popd
|
|
}
|
|
|
|
main "$@"
|