Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
fix: update build
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Dec 1, 2023
1 parent 2236eb3 commit 74931a5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@ mkdir .cache
echo "Installing re2 v${VERSION} for Node v${NODE_VERSION} (${farch})"
npm install "re2@${TOOL_VERSION}" --save-exact --no-audit --no-fund --prefix .cache --no-progress

ls -la .cache/node_modules/re2/build/Release
if [[ "$ARCH" = "aarch64" ]]; then
echo "Rebuilding re2 v${VERSION} for Node v${NODE_VERSION} (${farch})"
npm explore re2 --prefix .cache -- npm run rebuild
fi

echo "Testing re2 v${VERSION} for Node v${NODE_VERSION} (${farch})"
docker pull node:20 > /dev/null
docker pull "node:${NODE_VERSION}" > /dev/null
docker run --rm \
--platform ${darch} \
-v "$(pwd)/.cache:/cache" \
-w /cache \
node:20 \
"node:${NODE_VERSION}" \
node -e "new require('re2')('.*').exec('test') && console.log(process.arch)"

echo "Compressing re2 v${VERSION} for Node v${NODE_VERSION} (${farch})"
Expand Down

0 comments on commit 74931a5

Please sign in to comment.