diff options
author | Chocobozzz <me@florianbigard.com> | 2022-06-28 14:29:32 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-06-28 14:29:32 +0200 |
commit | 65db089d924507abdb0c417baede2ed5561b2ab5 (patch) | |
tree | 55d92a08f06056235b7d5109dda12cf404ba6ea3 | |
parent | 4644ad30ddfe5833a56ba6da20fed3d2f3e35274 (diff) | |
download | PeerTube-65db089d924507abdb0c417baede2ed5561b2ab5.tar.gz PeerTube-65db089d924507abdb0c417baede2ed5561b2ab5.tar.zst PeerTube-65db089d924507abdb0c417baede2ed5561b2ab5.zip |
More flexible release script
-rwxr-xr-x | scripts/release.sh | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/release.sh b/scripts/release.sh index 76970b79b..2b922a749 100755 --- a/scripts/release.sh +++ b/scripts/release.sh | |||
@@ -26,6 +26,8 @@ fi | |||
26 | 26 | ||
27 | maintainer_public_key=${MAINTAINER_GPG:-"583A612D890159BE"} | 27 | maintainer_public_key=${MAINTAINER_GPG:-"583A612D890159BE"} |
28 | 28 | ||
29 | peertube_directory=$(basename $(pwd)) | ||
30 | |||
29 | branch=$(git symbolic-ref --short -q HEAD) | 31 | branch=$(git symbolic-ref --short -q HEAD) |
30 | if [ "$branch" != "develop" ] && [[ "$branch" != release/* ]]; then | 32 | if [ "$branch" != "develop" ] && [[ "$branch" != release/* ]]; then |
31 | echo "Need to be on develop or release branch." | 33 | echo "Need to be on develop or release branch." |
@@ -80,13 +82,13 @@ rm -f "./client/dist/embed-stats.json" | |||
80 | 82 | ||
81 | # temporary setup | 83 | # temporary setup |
82 | cd .. | 84 | cd .. |
83 | ln -s "PeerTube" "$directory_name" | 85 | ln -s "$peertube_directory" "$directory_name" |
84 | 86 | ||
85 | # archive creation + signing | 87 | # archive creation + signing |
86 | zip -9 -r "PeerTube/$zip_name" "${directories_to_archive[@]}" | 88 | zip -9 -r "$peertube_directory/$zip_name" "${directories_to_archive[@]}" |
87 | gpg --armor --detach-sign -u "$maintainer_public_key" "PeerTube/$zip_name" | 89 | gpg --armor --detach-sign -u "$maintainer_public_key" "$peertube_directory/$zip_name" |
88 | XZ_OPT="-e9 -T0" tar cfJ "PeerTube/$tar_name" "${directories_to_archive[@]}" | 90 | XZ_OPT="-e9 -T0" tar cfJ "$peertube_directory/$tar_name" "${directories_to_archive[@]}" |
89 | gpg --armor --detach-sign -u "$maintainer_public_key" "PeerTube/$tar_name" | 91 | gpg --armor --detach-sign -u "$maintainer_public_key" "$peertube_directory/$tar_name" |
90 | 92 | ||
91 | # temporary setup destruction | 93 | # temporary setup destruction |
92 | rm "$directory_name" | 94 | rm "$directory_name" |