Skip to content

Commit 92ed1ab

Browse files
JoeDoyle23joaocgreis
authored andcommitted
build: change nosign flag to sign and flips logic
Makes the default build on Windows not try to sign the node.exe binary after a build. Instead the 'sign' flag now indicates that the binary should be signed. The 'nosign' flag is left as a noop. Reviewed-By: Nikolai Vavilov <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Bartosz Sosnowski <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: João Reis <[email protected]> PR-URL: #10156
1 parent f7f662c commit 92ed1ab

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md
99
##### Checklist
1010
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->
1111

12-
- [ ] `make -j4 test` (UNIX), or `vcbuild test nosign` (Windows) passes
12+
- [ ] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes
1313
- [ ] tests and/or benchmarks are included
1414
- [ ] documentation is changed or added
1515
- [ ] commit message follows commit guidelines

BUILDING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Prerequisites:
115115
and tools which can be included in the global `PATH`.
116116

117117
```console
118-
> .\vcbuild nosign
118+
> .\vcbuild
119119
```
120120

121121
To run the tests:

vcbuild.bat

+9-8
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set target_arch=x86
1818
set target_env=
1919
set noprojgen=
2020
set nobuild=
21-
set nosign=
21+
set sign=
2222
set nosnapshot=
2323
set cctest_args=
2424
set test_args=
@@ -51,7 +51,8 @@ if /i "%1"=="x64" set target_arch=x64&goto arg-ok
5151
if /i "%1"=="vc2015" set target_env=vc2015&goto arg-ok
5252
if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok
5353
if /i "%1"=="nobuild" set nobuild=1&goto arg-ok
54-
if /i "%1"=="nosign" set nosign=1&goto arg-ok
54+
if /i "%1"=="nosign" set "sign="&goto arg-ok
55+
if /i "%1"=="sign" set sign=1&goto arg-ok
5556
if /i "%1"=="nosnapshot" set nosnapshot=1&goto arg-ok
5657
if /i "%1"=="noetw" set noetw=1&goto arg-ok
5758
if /i "%1"=="noperfctr" set noperfctr=1&goto arg-ok
@@ -72,7 +73,7 @@ if /i "%1"=="jslint" set jslint=1&goto arg-ok
7273
if /i "%1"=="jslint-ci" set jslint_ci=1&goto arg-ok
7374
if /i "%1"=="package" set package=1&goto arg-ok
7475
if /i "%1"=="msi" set msi=1&set licensertf=1&set download_arg="--download=all"&set i18n_arg=small-icu&goto arg-ok
75-
if /i "%1"=="build-release" set build_release=1&goto arg-ok
76+
if /i "%1"=="build-release" set build_release=1&set sign=1&goto arg-ok
7677
if /i "%1"=="upload" set upload=1&goto arg-ok
7778
if /i "%1"=="small-icu" set i18n_arg=%1&goto arg-ok
7879
if /i "%1"=="full-icu" set i18n_arg=%1&goto arg-ok
@@ -130,7 +131,7 @@ call :getnodeversion || exit /b 1
130131

131132
if "%target%"=="Clean" rmdir /Q /S "%~dp0%config%\node-v%FULLVERSION%-win-%target_arch%" > nul 2> nul
132133

133-
if defined noprojgen if defined nobuild if defined nosign if not defined msi goto licensertf
134+
if defined noprojgen if defined nobuild if not defined sign if not defined msi goto licensertf
134135

135136
@rem Set environment for msbuild
136137

@@ -189,8 +190,8 @@ if errorlevel 1 goto exit
189190
if "%target%" == "Clean" goto exit
190191

191192
:sign
192-
@rem Skip signing if the `nosign` option was specified.
193-
if defined nosign goto licensertf
193+
@rem Skip signing unless the `sign` option was specified.
194+
if not defined sign goto licensertf
194195

195196
call tools\sign.bat Release\node.exe
196197
if errorlevel 1 echo Failed to sign exe&goto exit
@@ -269,7 +270,7 @@ echo Building node-v%FULLVERSION%-%target_arch%.msi
269270
msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:PlatformToolset=%PLATFORM_TOOLSET% /p:GypMsvsVersion=%GYP_MSVS_VERSION% /p:Configuration=%config% /p:Platform=%target_arch% /p:NodeVersion=%NODE_VERSION% /p:FullVersion=%FULLVERSION% /p:DistTypeDir=%DISTTYPEDIR% %noetw_msi_arg% %noperfctr_msi_arg% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
270271
if errorlevel 1 goto exit
271272

272-
if defined nosign goto upload
273+
if not defined sign goto upload
273274
call tools\sign.bat node-v%FULLVERSION%-%target_arch%.msi
274275
if errorlevel 1 echo Failed to sign msi&goto exit
275276

@@ -364,7 +365,7 @@ echo Failed to create vc project files.
364365
goto exit
365366

366367
:help
367-
echo vcbuild.bat [debug/release] [msi] [test-all/test-uv/test-inspector/test-internet/test-pummel/test-simple/test-message] [clean] [noprojgen] [small-icu/full-icu/without-intl] [nobuild] [nosign] [x86/x64] [vc2015] [download-all] [enable-vtune]
368+
echo vcbuild.bat [debug/release] [msi] [test-all/test-uv/test-inspector/test-internet/test-pummel/test-simple/test-message] [clean] [noprojgen] [small-icu/full-icu/without-intl] [nobuild] [sign] [x86/x64] [vc2015] [download-all] [enable-vtune]
368369
echo Examples:
369370
echo vcbuild.bat : builds release build
370371
echo vcbuild.bat debug : builds debug build

0 commit comments

Comments
 (0)