aboutsummaryrefslogtreecommitdiffstats
path: root/change_version.sh
blob: 9e6400b97e0ef50e9bd50719a4c58a90846bf7f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
[ -z "$1" ] && exit

for i in pom.xml */pom.xml
do
    V=`head -20 $i | grep "<version>" | head -1 | cut -d ">" -f2 | cut -d "<" -f1`
    perl -pi -e "s;<version>$V</version>;<version>$1</version>;" $i
    echo $V $i
done

perl -pi -e "s;<gQueryVersion>.+</gQueryVersion>;<gQueryVersion>$1</gQueryVersion>;" \
     archetype/src/main/resources/archetype-resources/pom.xml