Welcome to mirror list, hosted at ThFree Co, Russian Federation.

release.sh « scripts - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 75d2115aadf83ad601ed295134b9ca4db0fbd848 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env bash

# script for creating a zip and tarball for inclusion in node

unset CDPATH

set -e

rm -rf release *.tgz || true
rm node_modules/node-gyp/gyp/pylib/gyp/*.pyc || true
rm node_modules/node-gyp/gyp/pylib/gyp/generator/*.pyc || true
mkdir release
node ./bin/npm-cli.js pack --loglevel error >/dev/null
mv *.tgz release
cd release
tar xzf *.tgz
cp ../.npmrc package/
cp -r ../tap-snapshots package/
cp -r ../test package/

mkdir node_modules
mv package node_modules/npm

# make the zip for windows users
cp node_modules/npm/bin/*.cmd .
zipname=npm-$(node ../bin/npm-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-$(node ../../bin/npm-cli.js -v).tgz
tar czf "$tarname" npm

cd ..
mv "node_modules/$tarname" .

rm -rf *.cmd
rm -rf node_modules

cd ..

echo "release/$tarname"
echo "release/$zipname"