diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-15 13:23:48 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-15 16:43:37 +0100 |
commit | 1e5c707b08b0cb8b61138e583747ec0ce681547b (patch) | |
tree | 6e8e2aadd9f0fa5792df36fa68eda4be8e41a210 /scripts | |
parent | 519b8df5f840a9223dd78a83cbc484b0eebef578 (diff) | |
download | PeerTube-1e5c707b08b0cb8b61138e583747ec0ce681547b.tar.gz PeerTube-1e5c707b08b0cb8b61138e583747ec0ce681547b.tar.zst PeerTube-1e5c707b08b0cb8b61138e583747ec0ce681547b.zip |
Add github release to release script
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/release.sh | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/scripts/release.sh b/scripts/release.sh index aef4327e4..369f46746 100755 --- a/scripts/release.sh +++ b/scripts/release.sh | |||
@@ -16,20 +16,42 @@ if [ -z "$1" ]; then | |||
16 | exit -1 | 16 | exit -1 |
17 | fi | 17 | fi |
18 | 18 | ||
19 | if [ -z $GITHUB_TOKEN ]; then | ||
20 | echo "Need GITHUB_TOKEN env set." | ||
21 | exit -1 | ||
22 | fi | ||
23 | |||
24 | version="v$1" | ||
25 | directory_name="peertube-$version" | ||
26 | zip_name="peertube-$version.zip" | ||
27 | |||
19 | cd ./client || exit -1 | 28 | cd ./client || exit -1 |
20 | npm version --no-git-tag-version --no-commit-hooks $1 || exit -1 | 29 | npm version --no-git-tag-version --no-commit-hooks $1 || exit -1 |
21 | 30 | ||
22 | cd ../ || exit -1 | 31 | cd ../ || exit -1 |
23 | npm version -f --no-git-tag-version --no-commit-hooks $1 || exit -1 | 32 | npm version -f --no-git-tag-version --no-commit-hooks $1 || exit -1 |
24 | 33 | ||
25 | git commit package.json client/package.json -m "Bumped to version $1" || exit -1 | 34 | git commit package.json client/package.json -m "Bumped to version $version" || exit -1 |
26 | git tag -s -a "v$1" -m "v$1" | 35 | git tag -s -a "$version" -m "$version" |
27 | 36 | ||
28 | npm run build || exit -1 | 37 | npm run build || exit -1 |
29 | #npm test || exit -1 | ||
30 | 38 | ||
31 | cd ../ || exit -1 | 39 | cd ../ || exit -1 |
32 | 40 | ||
33 | ln -s "PeerTube" "peertube-v$1" || exit -1 | 41 | ln -s "PeerTube" "$directory_name" || exit -1 |
34 | zip -r "PeerTube/peertube-v$1.zip" "peertube-v$1"/{CREDITS.md,FAQ.md,LICENSE,README.md,client/dist/,client/yarn.lock,client/package.json,config,dist,package.json,scripts,support,tsconfig.json,yarn.lock} || exit -1 | 42 | zip -r "PeerTube/$zip_name" "$directory_name/CREDITS.md" "$directory_name/FAQ.md" \ |
35 | rm "peertube-v$1" || exit -1 | 43 | "$directory_name/LICENSE" "$directory_name/README.md" \ |
44 | "$directory_name/client/dist/" "$directory_name/client/yarn.lock" \ | ||
45 | "$directory_name/client/package.json" "$directory_name/config" \ | ||
46 | "$directory_name/dist" "$directory_name/package.json" \ | ||
47 | "$directory_name/scripts" "$directory_name/support" \ | ||
48 | "$directory_name/tsconfig.json" "$directory_name/yarn.lock" \ | ||
49 | || exit -1 | ||
50 | rm "$directory_name" || exit -1 | ||
51 | |||
52 | cd "PeerTube" || exit -1 | ||
53 | |||
54 | git push origin --tag | ||
55 | |||
56 | github-release release --user chocobozzz --repo peertube --tag "$version" --name "$version" | ||
57 | github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$version" --file "$zip_name" | ||