Skip to content

Commit ef04be6

Browse files
committed
Allow release candidate format in the version check
1 parent 495f1f3 commit ef04be6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/validate-new-version.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ fi
1515
PLANNED_VERSION="$1"
1616

1717
# Check if the version fits the SemVer formatting
18-
if [[ ! "$PLANNED_VERSION" =~ ^[0-9]+(\.[0-9]+){2}$ ]]; then
19-
echo "::error::Error: Invalid version format '$PLANNED_VERSION'. The version must be in the format X.X.X (e.g., 0.4.0, 1.21.51)."
18+
if [[ ! "$PLANNED_VERSION" =~ ^[0-9]+(\.[0-9]+){2}(rc[0-9]+)?$ ]]; then
19+
echo "::error::Error: Invalid version format '$PLANNED_VERSION'. The version must be in the format X.X.X[rcN] (e.g., 0.4.0, 1.21.51, 1.21.51rc1)."
2020
exit 1
2121
fi
2222

0 commit comments

Comments
 (0)