Skip to content

Commit 1fa5d50

Browse files
committed
Omit argon2 prebuilds
Since we build from source, these are dead weight. It also ensures we did in fact build from source.
1 parent d74b002 commit 1fa5d50

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ci/build/build-release.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,15 @@ EOF
7979
mv npm-shrinkwrap.json "$RELEASE_PATH"
8080

8181
if [ "$KEEP_MODULES" = 1 ]; then
82-
rsync node_modules/ "$RELEASE_PATH/node_modules"
82+
local rsync_opts=()
83+
if [[ ${DEBUG-} = 1 ]]; then
84+
rsync_opts+=(-vh)
85+
fi
86+
# If we build from source, exclude the prebuilds.
87+
if [[ ${npm_config_build_from_source-} = true ]]; then
88+
rsync_opts+=(--exclude /argon2/prebuilds)
89+
fi
90+
rsync "${rsync_opts[@]}" node_modules/ "$RELEASE_PATH/node_modules"
8391
# Remove dev dependencies.
8492
pushd "$RELEASE_PATH"
8593
npm prune --production

0 commit comments

Comments
 (0)