mirror of
https://github.com/coder/code-server.git
synced 2026-05-05 03:55:18 +02:00
Omit argon2 prebuilds
Since we build from source, these are dead weight. It also ensures we did in fact build from source.
This commit is contained in:
@@ -79,7 +79,15 @@ EOF
|
|||||||
mv npm-shrinkwrap.json "$RELEASE_PATH"
|
mv npm-shrinkwrap.json "$RELEASE_PATH"
|
||||||
|
|
||||||
if [ "$KEEP_MODULES" = 1 ]; then
|
if [ "$KEEP_MODULES" = 1 ]; then
|
||||||
rsync node_modules/ "$RELEASE_PATH/node_modules"
|
local rsync_opts=()
|
||||||
|
if [[ ${DEBUG-} = 1 ]]; then
|
||||||
|
rsync_opts+=(-vh)
|
||||||
|
fi
|
||||||
|
# If we build from source, exclude the prebuilds.
|
||||||
|
if [[ ${npm_config_build_from_source-} = true ]]; then
|
||||||
|
rsync_opts+=(--exclude /argon2/prebuilds)
|
||||||
|
fi
|
||||||
|
rsync "${rsync_opts[@]}" node_modules/ "$RELEASE_PATH/node_modules"
|
||||||
# Remove dev dependencies.
|
# Remove dev dependencies.
|
||||||
pushd "$RELEASE_PATH"
|
pushd "$RELEASE_PATH"
|
||||||
npm prune --production
|
npm prune --production
|
||||||
|
|||||||
Reference in New Issue
Block a user