Skip to content

Commit bfe973c

Browse files
committed
ci: release checks for local tags before publishing
Signed-off-by: Daniel Garnier-Moiroux <[email protected]>
1 parent f52e1ae commit bfe973c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/release.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ set -euo pipefail
55
VERSION="$1"
66
NEXT_VERSION="$2"
77

8+
if git tag | grep "${VERSION}"; then
9+
echo "Tag v${VERSION} already exists, bailing out"
10+
exit 1
11+
fi
12+
813
./mvnw versions:set -DgenerateBackupPoms=false -DnewVersion="$VERSION"
914
# macos sed
1015
sed -i '' -e "s/<version>.*<\\/version>/<version>${VERSION}<\\/version>/g" README.md

0 commit comments

Comments
 (0)