]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/release.sh
Add AP fetch tests
[github/Chocobozzz/PeerTube.git] / scripts / release.sh
index ef6399b68a2ff6690892d6842d9909be49d84f06..ccb93bc44c500abfbbe27b040be2b83c03a3ac14 100755 (executable)
@@ -24,16 +24,18 @@ if [ -z "$GITHUB_TOKEN" ]; then
   exit -1
 fi
 
+maintainer_public_key=${MAINTAINER_GPG:-"583A612D890159BE"}
+
 branch=$(git symbolic-ref --short -q HEAD)
-if [ "$branch" != "develop" ] && [[ "$branch" != feature/* ]]; then
+if [ "$branch" != "develop" ] && [[ "$branch" != release/* ]]; then
   echo "Need to be on develop or release branch."
   exit -1
 fi
 
 version="v$1"
 github_prerelease_option=""
-if [[ "$version" = *".pre."* ]]; then
-  echo "This is a pre-release."
+if [[ "$version" = *"-alpha."* ]] || [[ "$version" = *"-beta."* ]] || [[ "$version" = *"-rc."* ]]; then
+  echo -e "This is a pre-release.\n"
   github_prerelease_option="--pre-release"
 fi
 
@@ -43,7 +45,7 @@ tar_name="peertube-$version.tar.xz"
 
 changelog=$(awk -v version="$version" '/## v/ { printit = $2 == version }; printit;' CHANGELOG.md | grep -v "$version" | sed '1{/^$/d}')
 
-printf "Changelog will be:\\n%s\\n" "$changelog"
+printf "Changelog will be:\\n\\n%s\\n\\n" "$changelog"
 
 read -p "Are you sure to release? " -n 1 -r
 echo
@@ -75,7 +77,6 @@ rm "./client/dist/embed-stats.json"
                           "$directory_name/dist" "$directory_name/package.json" \
                           "$directory_name/scripts" "$directory_name/support" \
                           "$directory_name/tsconfig.json" "$directory_name/yarn.lock")
-  maintainer_public_key="583A612D890159BE"
 
   # temporary setup
   cd ..