Skip to content

Commit 144b40d

Browse files
Allow both x.y and x.y.z
1 parent 661c2da commit 144b40d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

update-version.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ fi
1313
version="$1"
1414
message="$2"
1515

16-
# Validate version format (strictly a.b.c)
17-
if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
18-
echo "Warning: Version '$version' does not match the standard format a.b.c."
16+
# Validate version format (allow x.y or x.y.z)
17+
if [[ ! "$version" =~ ^[0-9]+\.[0-9]+(\.[0-9]+)?$ ]]; then
18+
echo "Warning: Version '$version' does not match the standard format x.y or x.y.z."
1919
echo "Please validate the version number manually."
2020
read -p "Do you want to continue? [y/N]: " confirm
2121
if [[ ! "$confirm" =~ ^[Yy]$ ]]; then

0 commit comments

Comments
 (0)