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:
Asher 2026-04-06 11:35:20 -08:00
parent d74b002969
commit 1fa5d5084b
No known key found for this signature in database
GPG key ID: D63C1EF81242354A

View file

@ -79,7 +79,15 @@ EOF
mv npm-shrinkwrap.json "$RELEASE_PATH"
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.
pushd "$RELEASE_PATH"
npm prune --production