Created
February 9, 2012 15:55
-
-
Save oleics/1780781 to your computer and use it in GitHub Desktop.
Let vcbuild.bat create a zip-archive of node and npm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rem Use curl and 7za | |
set NPM_VERSION=1.1.0-3 | |
curl -o "%temp%\npm.zip" "http://nodejs.org/dist/npm-%NPM_VERSION%.zip" | |
if not exist "%temp%\npm" ( mkdir "%temp%\npm" ) | |
7za x "%temp%\npm.zip" -o"%temp%\npm" | |
7za a -tzip "Release\node-v%NODE_VERSION%-win.zip" "Release\node.exe" "%temp%\npm\*" -mx9 | |
rem Same but with wget and zip/unzip | |
set NPM_VERSION=1.1.0-3 | |
wget -O "%temp%\npm.zip" "http://nodejs.org/dist/npm-%NPM_VERSION%.zip" | |
if not exist "%temp%\npm" ( mkdir "%temp%\npm" ) | |
unzip "%temp%\npm.zip" -d "%temp%\npm" | |
zip -r9 "Release\node-v%NODE_VERSION%-win.zip" "Release\node.exe" "%temp%\npm\*" | |
rem Now upload "Release\node-v%NODE_VERSION%-win.zip" to nodejs.org/dist.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Questions:
How to determine the version of npm to use?
What tools are available?
How to unzip and zip in VC build env?
How to download in VC build env?
Is the build of npm stored already locally during build-process to avoid version-determination and the download?