summaryrefslogtreecommitdiffstats
path: root/jjb/include-update-pom-versions.sh
blob: 0e269a2af4b567f4d72d52a1426a77879adcb342 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

## Will update POM in workspace with release version

if [ ! -e version.properties ]; then
    echo "Missing version.properties"
    exit 1
fi

## will setup variable release_version
source ./version.properties

VERSION=$release_version

## handle POM files with no parent
for file in $(find . -name pom.xml); do
    if [ "$(grep -c '<parent>' $file)" == "0" ]; then
        (
            cd $(dirname $file)
            ${MVN} versions:set versions:commit \
                -DnewVersion=$VERSION \
                -DprocessDependencies=false
        )
    fi
done

find . -name pom.xml.versionsBackup -delete