Skip to content

Commit

Permalink
Rebuild binaries before publishing (#1426)
Browse files Browse the repository at this point in the history
Executing "npm install --build-from-source" only builds the module for
one of the N-API target versions. The build command has to be executed
explicitly to generate builds targeting each of the specified N-API
versions.
This should fix publishing binaries.
  • Loading branch information
nickrum authored Feb 14, 2021
1 parent 2aae3a5 commit 0eba2cd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/build-appveyor.bat
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ CALL npm test
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:NPM_TEST_FINISHED
CALL node_modules\.bin\node-pre-gyp rebuild --msvs_version=%msvs_version% %TOOLSET_ARGS%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO packaging for node-gyp
CALL node_modules\.bin\node-pre-gyp package %TOOLSET_ARGS%
::make commit message env var shorter
Expand Down
1 change: 1 addition & 0 deletions scripts/build_against_electron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ NPM_BIN_DIR="$(npm bin -g 2>/dev/null)"

function publish() {
if [[ ${PUBLISHABLE:-false} == true ]] && [[ ${COMMIT_MESSAGE} =~ "[publish binary]" ]]; then
node-pre-gyp rebuild --clang=1 $GYP_ARGS
node-pre-gyp package $GYP_ARGS
node-pre-gyp publish $GYP_ARGS
node-pre-gyp info $GYP_ARGS
Expand Down
1 change: 1 addition & 0 deletions scripts/build_against_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set -e -u

function publish() {
if [[ ${PUBLISHABLE:-false} == true ]] && [[ ${COMMIT_MESSAGE} =~ "[publish binary]" ]]; then
CFLAGS="${CFLAGS:-} -include $(pwd)/src/gcc-preinclude.h" CXXFLAGS="${CXXFLAGS:-} -include $(pwd)/src/gcc-preinclude.h" node-pre-gyp rebuild --clang=1
node-pre-gyp package testpackage
node-pre-gyp publish
node-pre-gyp info
Expand Down

0 comments on commit 0eba2cd

Please sign in to comment.