Carsten Lund | 2d06a69 | 2017-02-23 18:23:07 +0000 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | ## Will update POM in workspace with release version |
| 4 | |
| 5 | if [ ! -e version.properties ]; then |
| 6 | echo "Missing version.properties" |
| 7 | exit 1 |
| 8 | fi |
| 9 | |
| 10 | ## will setup variable release_version |
| 11 | source ./version.properties |
| 12 | |
| 13 | VERSION=$release_version |
| 14 | |
| 15 | ## handle POM files with no parent |
| 16 | for 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 |
| 25 | done |
| 26 | |
| 27 | find . -name pom.xml.versionsBackup -delete |
| 28 | |