3 ## Will update POM in workspace with release version
5 if [ ! -e version.properties ]; then
6 echo "Missing version.properties"
10 ## will setup variable release_version
11 source ./version.properties
13 RELEASE_VERSION=$release_version
15 echo Changing POM version to $RELEASE_VERSION
18 for file in $(find . -name pom.xml); do
19 VERSION=$(xpath -q -e '//project/version/text()' $file)
20 PVERSION=$(xpath -q -e '//project/parent/version/text()' $file)
21 echo before changes VERSION=$VERSION PVERSION=$PVERSION file=$file
22 if [ "$VERSION" != "" ]; then
23 awk -v v=$RELEASE_VERSION '
26 sub(/<version>.*</,"<version>" v "<",$0)
34 VERSION=$(xpath -q -e '//project/version/text()' $file)
35 PVERSION=$(xpath -q -e '//project/parent/version/text()' $file)
36 echo after changes VERSION=$VERSION PVERSION=$PVERSION file=$file