Skip to content

Commit e62940a

Browse files
committed
release-version.sh: enable skipping of digit check
If --skip-version-check is given, also skip the check enforcing that the release version starts with a number. And when that check fails, give a hint that this flag can skip it.
1 parent aacec2d commit e62940a

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

release-version.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,15 @@ test "$VERSION" || test ! -t 0 || {
133133

134134
# Check that the release version number starts with a digit.
135135
test "$VERSION" || die 'Please specify the version to release!'
136-
case "$VERSION" in
137-
[0-9]*)
138-
;;
139-
*)
140-
die "Version '$VERSION' does not start with a digit!"
141-
esac
136+
test "$SKIP_VERSION_CHECK" || {
137+
case "$VERSION" in
138+
[0-9]*)
139+
;;
140+
*)
141+
die "Version '$VERSION' does not start with a digit!
142+
If you are sure, try again with --skip-version-check flag."
143+
esac
144+
}
142145

143146
# Check that the release version number conforms to SemVer.
144147
VALID_SEMVER_BUMP="$(cd "$(dirname "$0")" && pwd)/valid-semver-bump.sh"

0 commit comments

Comments
 (0)