diff --git a/release/new_version.sh b/release/new_version.sh index a7bc8664eb14eed7cc3321090db53039549dbfd3..b5b1ba41ba0d03abcd718e4e6b7c3cb4641bc641 100755 --- a/release/new_version.sh +++ b/release/new_version.sh @@ -1,10 +1,10 @@ #!/bin/bash ### Releasing -current=`grep -P "version\": \"\d+.\d+.\d+(\w*)" package.json | grep -oP "\d+.\d+.\d+(\w*)"` +current=`grep -P "version\": \"\d+.\d+.\d+(-\w*)" package.json | grep -oP "\d+.\d+.\d+(-\w*)"` echo "Current version: $current" -if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ ]]; then +if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+(-(alpha|beta|rc)[0-9]*)?$ ]]; then echo "Changing to version: $1" # Change the version in package.json and test file sed -i "s/version\": .*/version\": \"$1\",/g" package.json