Skip to content

Commit

Permalink
build: use npm being released during release
Browse files Browse the repository at this point in the history
There was some weirdness going on where, depending on your
local setup during release, you could get unexpected results
during build (specifically, the version on the tarball and zip
corresponded to your global npm's version)

I went ahead and also made it so the npm pack is also done
by the version getting released, to avoid any possible
issues with 2.x vs 3.x

PR-URL: npm/npm#9012
  • Loading branch information
zkat authored and iarna committed Jul 24, 2015
1 parent 39752c5 commit b3b378f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e

rm -rf release *.tgz || true
mkdir release
npm pack --loglevel error >/dev/null
node ./cli.js pack --loglevel error >/dev/null
mv *.tgz release
cd release
tar xzf *.tgz
Expand All @@ -18,12 +18,12 @@ mv package node_modules/npm

# make the zip for windows users
cp node_modules/npm/bin/*.cmd .
zipname=npm-$(npm -v).zip
zipname=npm-$(node ../cli.js -v).zip
zip -q -9 -r -X "$zipname" *.cmd node_modules

# make the tar for node's deps
cd node_modules
tarname=npm-$(npm -v).tgz
tarname=npm-$(node ../../cli.js -v).tgz
tar czf "$tarname" npm

cd ..
Expand Down

0 comments on commit b3b378f

Please sign in to comment.