[Build] Bumping version to next rc made easier (build.sh bump rcX).

This commit is contained in:
hackademix 2018-12-27 10:50:04 +01:00
parent 8493f63e25
commit 67312d0385
1 changed files with 8 additions and 3 deletions

View File

@ -26,10 +26,15 @@ if [[ "$1" == "bump" ]]; then
NEW_VER='"'"$2"
elif [[ "$2" == *rc* ]]; then # new RC after release
if [[ "$2" == rc* ]]; then
echo >&2 "Please specify next release version (like 12rc1). Current is $VER"
exit 1
if [[ ! "$VER" == *rc* ]]; then
echo >&2 "Please specify next release version (like 12rc1). Current is $VER"
exit 1
else
pattern='rc\d+'
fi
else
pattern='\b(?:\d+rc)?\d+'
fi
pattern='\b(?:\d+rc)?\d+'
else # incremental version
pattern='\b\d+'
fi