mirror of
https://github.com/coder/code-server.git
synced 2026-04-16 03:48:16 -05:00
Compare commits
2 Commits
v4.113.0-r
...
v4.113.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82fe3a72a2 | ||
|
|
b27ceeb106 |
@@ -36,13 +36,6 @@ main() {
|
||||
rsync ./lib/vscode/ThirdPartyNotices.txt "$RELEASE_PATH"
|
||||
|
||||
if [ "$KEEP_MODULES" = 1 ]; then
|
||||
# Copy Node. Package managers may shim their own "node" wrapper into the
|
||||
# PATH, so run node and ask it for its true path.
|
||||
local node_path
|
||||
node_path="$(node -p process.execPath)"
|
||||
rsync "$node_path" "$RELEASE_PATH/lib/node"
|
||||
chmod 755 "$RELEASE_PATH/lib/node"
|
||||
|
||||
# Copy the code-server launcher.
|
||||
mkdir -p "$RELEASE_PATH/bin"
|
||||
rsync ./ci/build/code-server.sh "$RELEASE_PATH/bin/code-server"
|
||||
@@ -85,11 +78,15 @@ EOF
|
||||
) > "$RELEASE_PATH/package.json"
|
||||
mv npm-shrinkwrap.json "$RELEASE_PATH"
|
||||
|
||||
rsync ci/build/npm-postinstall.sh "$RELEASE_PATH/postinstall.sh"
|
||||
|
||||
if [ "$KEEP_MODULES" = 1 ]; then
|
||||
rsync node_modules/ "$RELEASE_PATH/node_modules"
|
||||
# Remove dev dependencies.
|
||||
pushd "$RELEASE_PATH"
|
||||
npm prune --production
|
||||
popd
|
||||
fi
|
||||
|
||||
rsync ci/build/npm-postinstall.sh "$RELEASE_PATH/postinstall.sh"
|
||||
}
|
||||
|
||||
bundle_vscode() {
|
||||
@@ -104,17 +101,23 @@ bundle_vscode() {
|
||||
# npm package so exclude any .gitignore files.
|
||||
rsync_opts+=(--exclude .gitignore)
|
||||
|
||||
# Exclude Node as we will add it ourselves for the standalone and will not
|
||||
# need it for the npm package.
|
||||
# Exclude Node since we want to place it in a directory above.
|
||||
rsync_opts+=(--exclude /node)
|
||||
|
||||
# Exclude Node modules.
|
||||
# Exclude Node modules. Note that these will already only include production
|
||||
# dependencies, so if we do keep them there is no need to do any
|
||||
# post-processing to remove dev dependencies.
|
||||
if [[ $KEEP_MODULES = 0 ]]; then
|
||||
rsync_opts+=(--exclude node_modules)
|
||||
fi
|
||||
|
||||
rsync "${rsync_opts[@]}" "./lib/vscode-reh-web-$VSCODE_TARGET/" "$VSCODE_OUT_PATH"
|
||||
|
||||
# Copy the Node binary.
|
||||
if [[ $KEEP_MODULES = 1 ]]; then
|
||||
cp "./lib/vscode-reh-web-$VSCODE_TARGET/node" "$RELEASE_PATH/lib"
|
||||
fi
|
||||
|
||||
# Merge the package.json for the web/remote server so we can include
|
||||
# dependencies, since we want to ship this via NPM.
|
||||
jq --slurp '.[0] * .[1]' \
|
||||
|
||||
Reference in New Issue
Block a user