aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/release.sh34
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
17fi 17fi
18 18
19if [ -z $GITHUB_TOKEN ]; then
20 echo "Need GITHUB_TOKEN env set."
21 exit -1
22fi
23
24version="v$1"
25directory_name="peertube-$version"
26zip_name="peertube-$version.zip"
27
19cd ./client || exit -1 28cd ./client || exit -1
20npm version --no-git-tag-version --no-commit-hooks $1 || exit -1 29npm version --no-git-tag-version --no-commit-hooks $1 || exit -1
21 30
22cd ../ || exit -1 31cd ../ || exit -1
23npm version -f --no-git-tag-version --no-commit-hooks $1 || exit -1 32npm version -f --no-git-tag-version --no-commit-hooks $1 || exit -1
24 33
25git commit package.json client/package.json -m "Bumped to version $1" || exit -1 34git commit package.json client/package.json -m "Bumped to version $version" || exit -1
26git tag -s -a "v$1" -m "v$1" 35git tag -s -a "$version" -m "$version"
27 36
28npm run build || exit -1 37npm run build || exit -1
29#npm test || exit -1
30 38
31cd ../ || exit -1 39cd ../ || exit -1
32 40
33ln -s "PeerTube" "peertube-v$1" || exit -1 41ln -s "PeerTube" "$directory_name" || exit -1
34zip -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 42zip -r "PeerTube/$zip_name" "$directory_name/CREDITS.md" "$directory_name/FAQ.md" \
35rm "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
50rm "$directory_name" || exit -1
51
52cd "PeerTube" || exit -1
53
54git push origin --tag
55
56github-release release --user chocobozzz --repo peertube --tag "$version" --name "$version"
57github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$version" --file "$zip_name"