build: Fixes to release script
This commit is contained in:
parent
d274b28ae0
commit
87f6956e49
|
|
@ -17,18 +17,18 @@ main() {
|
||||||
echo "fatal: empty version number" >&2 ; exit 1
|
echo "fatal: empty version number" >&2 ; exit 1
|
||||||
fi
|
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"
|
printf "Releasing Radicle %s? [y/N] " "$version"
|
||||||
read confirmation
|
read confirmation
|
||||||
|
|
||||||
case "$confirmation" in
|
case "$confirmation" in
|
||||||
[Yy]*)
|
[Yy]*)
|
||||||
if git describe --exact-match --match='v*' 2>/dev/null; then
|
|
||||||
echo "Creating 'latest' symlink.."
|
echo "Creating 'latest' symlink.."
|
||||||
ssh -i "$SSH_KEY" "$SSH_ADDRESS" ln -snf /mnt/radicle/files/releases/$version /mnt/radicle/files/releases/latest
|
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 "Operation aborted."
|
echo "Operation aborted."
|
||||||
exit 1 ;;
|
exit 1 ;;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue