From b7b5961f7d724f87030b6e643f095defa61b47ae Mon Sep 17 00:00:00 2001 From: Marius Bogoevici Date: Mon, 17 Jul 2017 23:40:12 -0400 Subject: [PATCH] Add update version script --- update-version.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 update-version.sh diff --git a/update-version.sh b/update-version.sh new file mode 100755 index 000000000..bc0672b8e --- /dev/null +++ b/update-version.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +#Execute this script from local checkout of spring cloud stream + +./mvnw versions:update-parent -DparentVersion=[0.0.1,$2] -Pspring -DgenerateBackupPoms=false -DallowSnapshots=true +./mvnw versions:set -DnewVersion=$1 -DgenerateBackupPoms=false + + + +lines=$(find . -name 'pom.xml' | xargs egrep "SNAPSHOT|M[0-9]|RC[0-9]" | grep -v regex | wc -l) +if [ $lines -eq 0 ]; then + echo "No snapshots found" +else + echo "Snapshots found." +fi + +lines=$(find . -name 'pom.xml' | xargs egrep "M[0-9]" | grep -v regex | wc -l) +if [ $lines -eq 0 ]; then + echo "No milestones found" +else + echo "Milestones found." +fi + +lines=$(find . -name 'pom.xml' | xargs egrep "RC[0-9]" | grep -v regex | wc -l) +if [ $lines -eq 0 ]; then + echo "No release candidates found" +else + echo "Release candidates found." +fi