@@ -25,6 +25,7 @@ set sign=
25
25
set nosnapshot =
26
26
set cctest_args =
27
27
set test_args =
28
+ set stage_package =
28
29
set package =
29
30
set msi =
30
31
set upload =
@@ -153,6 +154,9 @@ if defined build_release (
153
154
set " pch = "
154
155
)
155
156
157
+ if defined msi set stage_package = 1
158
+ if defined package set stage_package = 1
159
+
156
160
:: assign path to node_exe
157
161
set " node_exe = %config% \node.exe"
158
162
set " node_gyp_exe = " %node_exe% " deps\npm\node_modules\node-gyp\bin\node-gyp"
@@ -313,15 +317,17 @@ if errorlevel 1 echo Failed to sign exe&goto exit
313
317
314
318
:licensertf
315
319
@ rem Skip license.rtf generation if not requested.
316
- if not defined licensertf goto package
320
+ if not defined licensertf goto stage_package
317
321
318
322
%config% \node.exe tools\license2rtf.js < LICENSE > %config% \license.rtf
319
323
if errorlevel 1 echo Failed to generate license.rtf& goto exit
320
324
321
- :package
322
- if not defined package goto msi
325
+ :stage_package
326
+ if not defined stage_package goto install-doctools
327
+
323
328
echo Creating package...
324
329
cd Release
330
+ rmdir /S /Q node-v%FULLVERSION% -win-%target_arch% > nul 2 > nul
325
331
mkdir node-v%FULLVERSION% -win-%target_arch% > nul 2 > nul
326
332
mkdir node-v%FULLVERSION% -win-%target_arch% \node_modules > nul 2 > nul
327
333
@@ -333,7 +339,7 @@ copy /Y ..\README.md node-v%FULLVERSION%-win-%target_arch%\ > nul
333
339
if errorlevel 1 echo Cannot copy README.md && goto package_error
334
340
copy /Y ..\CHANGELOG.md node-v%FULLVERSION% -win-%target_arch% \ > nul
335
341
if errorlevel 1 echo Cannot copy CHANGELOG.md && goto package_error
336
- robocopy /e ..\deps\npm node-v%FULLVERSION% -win-%target_arch% \node_modules\npm > nul
342
+ robocopy ..\deps\npm node-v%FULLVERSION% -win-%target_arch% \node_modules\npm /e /xd test > nul
337
343
if errorlevel 8 echo Cannot copy npm package && goto package_error
338
344
copy /Y ..\deps\npm\bin\npm node-v%FULLVERSION% -win-%target_arch% \ > nul
339
345
if errorlevel 1 echo Cannot copy npm && goto package_error
@@ -349,7 +355,11 @@ if not defined noetw (
349
355
copy /Y ..\src\res\node_etw_provider.man node-v%FULLVERSION% -win-%target_arch% \ > nul
350
356
if errorlevel 1 echo Cannot copy node_etw_provider.man && goto package_error
351
357
)
358
+ cd ..
352
359
360
+ :package
361
+ if not defined package goto msi
362
+ cd Release
353
363
echo Creating node-v%FULLVERSION% -win-%target_arch% .7z
354
364
del node-v%FULLVERSION% -win-%target_arch% .7z > nul 2 > nul
355
365
7z a -r -mx9 -t7z node-v%FULLVERSION% -win-%target_arch% .7z node-v%FULLVERSION% -win-%target_arch% > nul
0 commit comments