summaryrefslogtreecommitdiff
path: root/vcbuild.bat
diff options
context:
space:
mode:
authorRichard Lau <riclau@uk.ibm.com>2018-09-21 17:30:08 +0100
committerRichard Lau <riclau@uk.ibm.com>2018-10-02 13:19:49 -0400
commitb3b3f53a339135903133842888467a0e6798acd0 (patch)
treeca7390baf13d7033516a133166b4c4df199cc775 /vcbuild.bat
parent1d56ad0ca91e37c587ca15546c25e96f4b402634 (diff)
downloadandroid-node-v8-b3b3f53a339135903133842888467a0e6798acd0.tar.gz
android-node-v8-b3b3f53a339135903133842888467a0e6798acd0.tar.bz2
android-node-v8-b3b3f53a339135903133842888467a0e6798acd0.zip
build: exclude npm test directories on Windows
npm test directories are excluded on other platforms by `tools/install.py`. Do the same on Windows. Fixes: https://github.com/nodejs/node/issues/22901 PR-URL: https://github.com/nodejs/node/pull/23001 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: João Reis <reis@janeasystems.com>
Diffstat (limited to 'vcbuild.bat')
-rw-r--r--vcbuild.bat18
1 files changed, 14 insertions, 4 deletions
diff --git a/vcbuild.bat b/vcbuild.bat
index 56d51b8342..b90d2b09cc 100644
--- a/vcbuild.bat
+++ b/vcbuild.bat
@@ -25,6 +25,7 @@ set sign=
set nosnapshot=
set cctest_args=
set test_args=
+set stage_package=
set package=
set msi=
set upload=
@@ -153,6 +154,9 @@ if defined build_release (
set "pch="
)
+if defined msi set stage_package=1
+if defined package set stage_package=1
+
:: assign path to node_exe
set "node_exe=%config%\node.exe"
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
:licensertf
@rem Skip license.rtf generation if not requested.
-if not defined licensertf goto package
+if not defined licensertf goto stage_package
%config%\node.exe tools\license2rtf.js < LICENSE > %config%\license.rtf
if errorlevel 1 echo Failed to generate license.rtf&goto exit
-:package
-if not defined package goto msi
+:stage_package
+if not defined stage_package goto install-doctools
+
echo Creating package...
cd Release
+rmdir /S /Q node-v%FULLVERSION%-win-%target_arch% > nul 2> nul
mkdir node-v%FULLVERSION%-win-%target_arch% > nul 2> nul
mkdir node-v%FULLVERSION%-win-%target_arch%\node_modules > nul 2>nul
@@ -333,7 +339,7 @@ copy /Y ..\README.md node-v%FULLVERSION%-win-%target_arch%\ > nul
if errorlevel 1 echo Cannot copy README.md && goto package_error
copy /Y ..\CHANGELOG.md node-v%FULLVERSION%-win-%target_arch%\ > nul
if errorlevel 1 echo Cannot copy CHANGELOG.md && goto package_error
-robocopy /e ..\deps\npm node-v%FULLVERSION%-win-%target_arch%\node_modules\npm > nul
+robocopy ..\deps\npm node-v%FULLVERSION%-win-%target_arch%\node_modules\npm /e /xd test > nul
if errorlevel 8 echo Cannot copy npm package && goto package_error
copy /Y ..\deps\npm\bin\npm node-v%FULLVERSION%-win-%target_arch%\ > nul
if errorlevel 1 echo Cannot copy npm && goto package_error
@@ -349,7 +355,11 @@ if not defined noetw (
copy /Y ..\src\res\node_etw_provider.man node-v%FULLVERSION%-win-%target_arch%\ > nul
if errorlevel 1 echo Cannot copy node_etw_provider.man && goto package_error
)
+cd ..
+:package
+if not defined package goto msi
+cd Release
echo Creating node-v%FULLVERSION%-win-%target_arch%.7z
del node-v%FULLVERSION%-win-%target_arch%.7z > nul 2> nul
7z a -r -mx9 -t7z node-v%FULLVERSION%-win-%target_arch%.7z node-v%FULLVERSION%-win-%target_arch% > nul