| ## Will update POM in workspace with release version |
| if [ ! -e version.properties ]; then |
| echo "Missing version.properties" |
| ## will setup variable release_version |
| source ./version.properties |
| RELEASE_VERSION=$release_version |
| echo Changing POM version to $RELEASE_VERSION |
| for file in $(find . -name pom.xml); do |
| VERSION=$(xpath -q -e '//project/version/text()' $file) |
| PVERSION=$(xpath -q -e '//project/parent/version/text()' $file) |
| echo before changes VERSION=$VERSION PVERSION=$PVERSION file=$file |
| if [ "$VERSION" != "" ]; then |
| awk -v v=$RELEASE_VERSION ' |
| sub(/<version>.*</,"<version>" v "<",$0) |
| VERSION=$(xpath -q -e '//project/version/text()' $file) |
| PVERSION=$(xpath -q -e '//project/parent/version/text()' $file) |
| echo after changes VERSION=$VERSION PVERSION=$PVERSION file=$file |