diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/release.sh | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/scripts/release.sh b/scripts/release.sh index 572e6bdca..07fec00b8 100755 --- a/scripts/release.sh +++ b/scripts/release.sh | |||
@@ -1,7 +1,33 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | npm run build | 3 | shutdown() { |
4 | npm test | 4 | # Get our process group id |
5 | PGID=$(ps -o pgid= $$ | grep -o [0-9]*) | ||
6 | |||
7 | # Kill it in a new new process group | ||
8 | setsid kill -- -$PGID | ||
9 | exit 0 | ||
10 | } | ||
11 | |||
12 | trap "shutdown" SIGINT SIGTERM | ||
13 | |||
14 | if [ -z "$1" ]; then | ||
15 | echo "Need version as argument" | ||
16 | exit -1 | ||
17 | fi | ||
18 | |||
19 | cd ./client || exit -1 | ||
20 | npm version --no-git-tag-version --no-commit-hooks $1 || exit -1 | ||
21 | |||
22 | cd ../ || exit -1 | ||
23 | npm version -f --no-git-tag-version --no-commit-hooks $1 || exit -1 | ||
24 | |||
25 | git commit package.json client/package.json -m "Bumped to version $1" || exit -1 | ||
26 | git tag -s -a "v$1" -m "v$1" | ||
27 | |||
28 | npm run build || exit -1 | ||
29 | #npm test || exit -1 | ||
5 | 30 | ||
6 | cd ../ || exit -1 | 31 | cd ../ || exit -1 |
32 | rm -f PeerTube/peertube.zip || exit -1 | ||
7 | zip -r PeerTube/peertube.zip PeerTube/{CREDITS.md,node_modules,FAQ.md,LICENSE,README.md,client/dist/,client/yarn.lock,client/package.json,config,dist,package.json,scripts,support,tsconfig.json,yarn.lock} | 33 | zip -r PeerTube/peertube.zip PeerTube/{CREDITS.md,node_modules,FAQ.md,LICENSE,README.md,client/dist/,client/yarn.lock,client/package.json,config,dist,package.json,scripts,support,tsconfig.json,yarn.lock} |