From 67312d038506a14eb1d1a7c2e66e6a1f429c46d8 Mon Sep 17 00:00:00 2001 From: hackademix Date: Thu, 27 Dec 2018 10:50:04 +0100 Subject: [Build] Bumping version to next rc made easier (build.sh bump rcX). --- build.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 09b5830..422ecd6 100644 --- a/build.sh +++ b/build.sh @@ -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 -- cgit v1.2.3