aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xscripts/release.sh21
1 files changed, 15 insertions, 6 deletions
diff --git a/scripts/release.sh b/scripts/release.sh
index 9adfe2b5d..b5fa68f42 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -31,6 +31,12 @@ if [ "$branch" != "develop" ]; then
31fi 31fi
32 32
33version="v$1" 33version="v$1"
34github_prerelease_option=""
35if [[ "$version" = *".pre."* ]]; then
36 echo "This is a pre-release."
37 github_prerelease_option="--pre-release"
38fi
39
34directory_name="peertube-$version" 40directory_name="peertube-$version"
35zip_name="peertube-$version.zip" 41zip_name="peertube-$version.zip"
36tar_name="peertube-$version.tar.xz" 42tar_name="peertube-$version.tar.xz"
@@ -90,7 +96,7 @@ rm "./client/dist/embed-stats.json"
90( 96(
91 git push origin --tag 97 git push origin --tag
92 98
93 github-release release --user chocobozzz --repo peertube --tag "$version" --name "$version" --description "$changelog" 99 github-release release --user chocobozzz --repo peertube --tag "$version" --name "$version" --description "$changelog" "$github_prerelease_option"
94 github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$zip_name" --file "$zip_name" 100 github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$zip_name" --file "$zip_name"
95 github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$zip_name.asc" --file "$zip_name.asc" 101 github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$zip_name.asc" --file "$zip_name.asc"
96 github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$tar_name" --file "$tar_name" 102 github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$tar_name" --file "$tar_name"
@@ -98,9 +104,12 @@ rm "./client/dist/embed-stats.json"
98 104
99 git push origin develop 105 git push origin develop
100 106
101 # Update master branch 107 # Only update master if it is not a pre release
102 git checkout master 108 if [ -z "$github_prerelease_option" ]; then
103 git rebase develop 109 # Update master branch
104 git push origin master 110 git checkout master
105 git checkout develop 111 git rebase develop
112 git push origin master
113 git checkout develop
114 fi
106) 115)