From b38b655ca20374c98aa9c3f5b82580f7ba381bcf Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 28 Feb 2018 07:03:28 +0000 Subject: [PATCH] Add set-version.sh --- set-version.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 set-version.sh diff --git a/set-version.sh b/set-version.sh new file mode 100644 index 0000000..61099c3 --- /dev/null +++ b/set-version.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +if test $# != 1 +then + echo "next version missing" + exit +fi + +CURRENT=`grep '' pom.xml |head -n 1| sed 's/.*>\(.*\)<.*/\1/'` +NEXT=$1 + +echo Updating version from $CURRENT to $NEXT + +./mvnw versions:set -DnewVersion=$NEXT +perl -p -i -e "s,$CURRENT