Skip to content

Commit 0eba2cd

Browse files
authoredFeb 14, 2021
Rebuild binaries before publishing (#1426)
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.
1 parent 2aae3a5 commit 0eba2cd

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed
 

‎scripts/build-appveyor.bat

+2
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ CALL npm test
140140
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
141141

142142
:NPM_TEST_FINISHED
143+
CALL node_modules\.bin\node-pre-gyp rebuild --msvs_version=%msvs_version% %TOOLSET_ARGS%
144+
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
143145
ECHO packaging for node-gyp
144146
CALL node_modules\.bin\node-pre-gyp package %TOOLSET_ARGS%
145147
::make commit message env var shorter

‎scripts/build_against_electron.sh

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ NPM_BIN_DIR="$(npm bin -g 2>/dev/null)"
1010

1111
function publish() {
1212
if [[ ${PUBLISHABLE:-false} == true ]] && [[ ${COMMIT_MESSAGE} =~ "[publish binary]" ]]; then
13+
node-pre-gyp rebuild --clang=1 $GYP_ARGS
1314
node-pre-gyp package $GYP_ARGS
1415
node-pre-gyp publish $GYP_ARGS
1516
node-pre-gyp info $GYP_ARGS

‎scripts/build_against_node.sh

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set -e -u
66

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

0 commit comments

Comments
 (0)
Please sign in to comment.