Fix release script
authorChocobozzz <me@florianbigard.com>
Tue, 21 Aug 2018 07:29:13 +0000 (09:29 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 21 Aug 2018 07:37:11 +0000 (09:37 +0200)
scripts/release.sh

index 4b45c959d521a17d9c681b472bfdd782ca1dc9b8..ef6399b68a2ff6690892d6842d9909be49d84f06 100755 (executable)
@@ -47,8 +47,7 @@ printf "Changelog will be:\\n%s\\n" "$changelog"
 
 read -p "Are you sure to release? " -n 1 -r
 echo
-if [[ ! $REPLY =~ ^[Yy]$ ]]
-then
+if [[ ! $REPLY =~ ^[Yy]$ ]]; then
   exit 0
 fi
 
@@ -96,7 +95,12 @@ rm "./client/dist/embed-stats.json"
 (
   git push origin --tag
 
-  github-release release --user chocobozzz --repo peertube --tag "$version" --name "$version" --description "$changelog" "$github_prerelease_option"
+  if [ -z "$github_prerelease_option" ]; then
+    github-release release --user chocobozzz --repo peertube --tag "$version" --name "$version" --description "$changelog"
+  else
+    github-release release --user chocobozzz --repo peertube --tag "$version" --name "$version" --description "$changelog" "$github_prerelease_option"
+  fi
+
   github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$zip_name" --file "$zip_name"
   github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$zip_name.asc" --file "$zip_name.asc"
   github-release upload --user chocobozzz --repo peertube --tag "$version" --name "$tar_name" --file "$tar_name"