diff options
-rwxr-xr-x | scripts/release.sh | 21 |
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 | |||
31 | fi | 31 | fi |
32 | 32 | ||
33 | version="v$1" | 33 | version="v$1" |
34 | github_prerelease_option="" | ||
35 | if [[ "$version" = *".pre."* ]]; then | ||
36 | echo "This is a pre-release." | ||
37 | github_prerelease_option="--pre-release" | ||
38 | fi | ||
39 | |||
34 | directory_name="peertube-$version" | 40 | directory_name="peertube-$version" |
35 | zip_name="peertube-$version.zip" | 41 | zip_name="peertube-$version.zip" |
36 | tar_name="peertube-$version.tar.xz" | 42 | tar_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 | ) |