Skip to content
Permalink
Browse files

Release / Version number may contain a x when doing a major version.

  • Loading branch information
fxprunayre committed Jan 22, 2019
1 parent 2d0b433 commit 1c741b30d8f7447eb370ba702daf67f30dd0bfd4
Showing with 3 additions and 5 deletions.
  1. +3 −5 update-version.sh
@@ -38,19 +38,19 @@ then
fi


if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+(-SNAPSHOT|-RC[0-2]|-[0-9]+)?$ ]]; then
if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9x]+(-SNAPSHOT|-RC[0-2]|-[0-9]+)?$ ]]; then
echo
else
echo
echo 'Update failed due to incorrect versionnumber format: ' $1
echo 'The format should be three numbers separated by dots with optional -SNAPSHOT. e.g.: 2.7.0 or 2.7.0-SNAPSHOT'
echo 'The format should be three numbers separated by dots with optional -SNAPSHOT. e.g.: 2.7.0 or 2.7.0-SNAPSHOT or 2.7.x-SNAPSHOT'
echo
echo "Usage: ./`basename $0 $1` 2.7.0 2.7.0-RC0"
echo
exit
fi

if [[ $2 =~ ^[0-9]+.[0-9]+.[0-9]+(-SNAPSHOT|-RC[0-2]|-[0-9]+)?$ ]]; then
if [[ $2 =~ ^[0-9]+.[0-9]+.[0-9x]+(-SNAPSHOT|-RC[0-2]|-[0-9]+)?$ ]]; then
# Retrieve version and subversion
if [[ $2 =~ ^[0-9]+.[0-9]+.[0-9]+-.*$ ]]; then
new_version_main=`echo $2 | cut -d- -f1`
@@ -122,5 +122,3 @@ echo 'Module'
mvn versions:set -DnewVersion=${new_version} -DgenerateBackupPoms=false -Pwith-doc
echo



0 comments on commit 1c741b3

Please sign in to comment.
You can’t perform that action at this time.