Skip to content

Commit 268fcbe

Browse files
committed
more checks in release script
1 parent a351035 commit 268fcbe

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

scripts/release.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@ check_prerequisites() {
1717
fi
1818

1919
if [[ $1 =~ ^v[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,3}$ ]]; then
20-
echo "version string format is CORRECT"
20+
# echo "version string format is CORRECT"
21+
local last_tag=`git tag -l | sort | tail -1`
22+
if [[ "$last_tag" == "$1" ]]; then
23+
echo "tag $last_tag already exists"
24+
exit 1
25+
fi
26+
if [[ "$last_tag" > "$1" ]]; then
27+
echo "greater tag $last_tag already exists"
28+
exit 1
29+
fi
2130
else
2231
echo "version string format ins't correct"
2332
exit 1

0 commit comments

Comments
 (0)