build: Fixes to release script

This commit is contained in:
cloudhead 2024-12-16 11:08:27 +01:00
parent d274b28ae0
commit 87f6956e49
No known key found for this signature in database
1 changed files with 7 additions and 7 deletions

View File

@ -17,18 +17,18 @@ main() {
echo "fatal: empty version number" >&2 ; exit 1
fi
if ! git rev-parse --verify "v$version^{tag}" >/dev/null 2>&1; then
echo "error: '$version' is not a valid version, tag 'v$version' not found" >&2
exit 1
fi
printf "Releasing Radicle %s? [y/N] " "$version"
read confirmation
case "$confirmation" in
[Yy]*)
if git describe --exact-match --match='v*' 2>/dev/null; then
echo "Creating 'latest' symlink.."
ssh -i "$SSH_KEY" "$SSH_ADDRESS" ln -snf /mnt/radicle/files/releases/$version /mnt/radicle/files/releases/latest
else
echo "Release tag must start with 'v'; operation aborted."
exit 1
fi ;;
echo "Creating 'latest' symlink.."
ssh -i "$SSH_KEY" "$SSH_ADDRESS" ln -snf /mnt/radicle/files/releases/$version /mnt/radicle/files/releases/latest ;;
*)
echo "Operation aborted."
exit 1 ;;