Skip to content

Commit 8165209

Browse files
eliaweb-flow
andcommitted
Added version format validation to release script
Validates that version strings start with 'v' prefix. Exits with a warning message if the format is incorrect. Co-Authored-By: GitHub Copilot <noreply@github.com>
1 parent 19a7f30 commit 8165209

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bin/release

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ if [ -z "$version" ]; then
1010
exit 1
1111
fi
1212

13+
# warn if version doesn't start with "v"
14+
if [[ ! "$version" =~ ^v ]]; then
15+
echo "Warning: Version should start with 'v' (e.g., v1.2.3)"
16+
echo "Got: $version"
17+
exit 1
18+
fi
19+
1320
# if version file is not up to date, update it
1421
if [ "$version" != "$(cat VERSION)" ]; then
1522
echo "Version file is not up to date. Updating it..."

0 commit comments

Comments
 (0)