diff options
author | Chocobozzz <me@florianbigard.com> | 2018-07-25 17:05:15 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-25 17:05:15 +0200 |
commit | 87bec1051b9706b4ae1efbd92e4d974c01d98c51 (patch) | |
tree | 06baf6c8168352497e4eca878e119d1911ab2c9d | |
parent | ad77475251c3516dd5851a08655be79d7bf76245 (diff) | |
download | PeerTube-87bec1051b9706b4ae1efbd92e4d974c01d98c51.tar.gz PeerTube-87bec1051b9706b4ae1efbd92e4d974c01d98c51.tar.zst PeerTube-87bec1051b9706b4ae1efbd92e4d974c01d98c51.zip |
Handle pre releases in release script
-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 | ) |