Add set-version.sh

This commit is contained in:
Paul Campbell 2018-02-28 07:03:28 +00:00
parent ff392bf0c6
commit b38b655ca2

15
set-version.sh Normal file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
if test $# != 1
then
echo "next version missing"
exit
fi
CURRENT=`grep '<version>' 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</,$NEXT</," README.md