blob: 0e269a2af4b567f4d72d52a1426a77879adcb342 [file] [log] [blame]
Carsten Lund2d06a692017-02-23 18:23:07 +00001#!/bin/bash
2
3## Will update POM in workspace with release version
4
5if [ ! -e version.properties ]; then
6 echo "Missing version.properties"
7 exit 1
8fi
9
10## will setup variable release_version
11source ./version.properties
12
13VERSION=$release_version
14
15## handle POM files with no parent
16for file in $(find . -name pom.xml); do
17 if [ "$(grep -c '<parent>' $file)" == "0" ]; then
18 (
19 cd $(dirname $file)
20 ${MVN} versions:set versions:commit \
21 -DnewVersion=$VERSION \
22 -DprocessDependencies=false
23 )
24 fi
25done
26
27find . -name pom.xml.versionsBackup -delete
28