Skip to content

Commit

Permalink
More flexible release script
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed Jun 28, 2022
1 parent 4644ad3 commit 65db089
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ fi

maintainer_public_key=${MAINTAINER_GPG:-"583A612D890159BE"}

peertube_directory=$(basename $(pwd))

branch=$(git symbolic-ref --short -q HEAD)
if [ "$branch" != "develop" ] && [[ "$branch" != release/* ]]; then
echo "Need to be on develop or release branch."
Expand Down Expand Up @@ -80,13 +82,13 @@ rm -f "./client/dist/embed-stats.json"

# temporary setup
cd ..
ln -s "PeerTube" "$directory_name"
ln -s "$peertube_directory" "$directory_name"

# archive creation + signing
zip -9 -r "PeerTube/$zip_name" "${directories_to_archive[@]}"
gpg --armor --detach-sign -u "$maintainer_public_key" "PeerTube/$zip_name"
XZ_OPT="-e9 -T0" tar cfJ "PeerTube/$tar_name" "${directories_to_archive[@]}"
gpg --armor --detach-sign -u "$maintainer_public_key" "PeerTube/$tar_name"
zip -9 -r "$peertube_directory/$zip_name" "${directories_to_archive[@]}"
gpg --armor --detach-sign -u "$maintainer_public_key" "$peertube_directory/$zip_name"
XZ_OPT="-e9 -T0" tar cfJ "$peertube_directory/$tar_name" "${directories_to_archive[@]}"
gpg --armor --detach-sign -u "$maintainer_public_key" "$peertube_directory/$tar_name"

# temporary setup destruction
rm "$directory_name"
Expand Down

0 comments on commit 65db089

Please sign in to comment.