-
Notifications
You must be signed in to change notification settings - Fork 2
/
changeversion.sh
executable file
·72 lines (63 loc) · 2.27 KB
/
changeversion.sh
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#
#!/bin/bash
#
OLD_VERSION=1.4.5
NEW_VERSION=1.4.6
echo "Looking for MANIFEST.MF files"
FIND_RES=`find . -path ./.metadata -prune -o -name "MANIFEST.MF" -print`
for f in $FIND_RES
do
if grep -q "Bundle-Vendor: CEA" $f; then
if grep -q "Bundle-Version: $OLD_VERSION.qualifier" $f; then
echo " Changing version of:" $f
cp $f $f.old
sed "s/Bundle-Version: $OLD_VERSION.qualifier/Bundle-Version: $NEW_VERSION.qualifier/g" $f.old > $f
fi
fi
done
echo "Looking for pom.xml files"
FIND_RES=`find . -path ./.metadata -prune -o -name "pom.xml" -print`
for f in $FIND_RES
do
if grep -q -e "<groupId>fr.cea.modane</groupId>" -e "<groupId>fr.cea.modane.project</groupId>" $f; then
if grep -q "<version>$OLD_VERSION-SNAPSHOT</version>" $f; then
echo " Changing version of:" $f
cp $f $f.old
sed "s%<version>$OLD_VERSION-SNAPSHOT</version>%<version>$NEW_VERSION-SNAPSHOT</version>%g" $f.old > $f
fi
fi
done
echo "Looking for feature.xml files"
FIND_RES=`find . -path ./.metadata -prune -o -name "feature.xml" -print`
for f in $FIND_RES
do
if grep -q "provider-name=\"CEA\"" $f; then
if grep -q "version=\"$OLD_VERSION.qualifier\"" $f; then
echo " Changing version of:" $f
cp $f $f.old
sed "s/version=\"$OLD_VERSION.qualifier\"/version=\"$NEW_VERSION.qualifier\"/g" $f.old > $f
fi
fi
done
f=./plugins/fr.cea.modane.rcp/plugin.xml
if grep -q "Version $OLD_VERSION" $f; then
echo " Changing version of:" $f
cp $f $f.old
sed "s/Version $OLD_VERSION/Version $NEW_VERSION/g" $f.old > $f
fi
FIND_RES=`find ./releng/fr.cea.modane.updatesite -path ./.metadata -prune -o -name "*.product" -print`
for f in $FIND_RES
do
if grep -q "$OLD_VERSION.qualifier" $f; then
echo " Changing version of:" $f
cp $f $f.old
sed "s/$OLD_VERSION.qualifier/$NEW_VERSION.qualifier/g" $f.old > $f
fi
done
f=./README.md
if grep -q "https://github.com/cea-hpc/Modane/releases/tag/v$OLD_VERSION" $f; then
echo " Changing version of:" $f
cp $f $f.old
sed "s%https://github.com/cea-hpc/Modane/releases/tag/v$OLD_VERSION%https://github.com/cea-hpc/Modane/releases/tag/v$NEW_VERSION%g" $f.old > $f
fi
echo "DONE. All that remains is to change the SPLASH SCREEN (BMP 459x347)."