-
Notifications
You must be signed in to change notification settings - Fork 38
/
prepare-release.sh
56 lines (43 loc) · 1.58 KB
/
prepare-release.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
set -e
timestamp=$(date +%Y%m%d%H%M)
echo "preparing release"
echo "release version:"
read version
echo "next version:"
read nextversion
echo "Releasing $version"
#pull the latest state from the repository
git pull --rebase
#prepare update site
cd ../jnario-gh-pages
git pull origin gh-pages
cd ../jnario
#run all tests
mvn clean verify
#create release branch
git branch rb-$version
#change the releng/update-site/category.xml file. Replace <version>.qualifier by <version+1>
sed -i '' 's/$version/$nextversion/g' releng/org.jnario.updatesite/category.xml
sed -i '' 's/$version/$nextversion/g' releng/org.jnario.updatesite/site.xml
#update master to the next -SNAPSHOT version.
#update tycho managed plugins
mvn -Dtycho.mode=maven org.eclipse.tycho:tycho-versions-plugin:0.17.0:set-version -DnewVersion=$nextversion-SNAPSHOT
#update maven managed projects
for project in "org.jnario.standalone.maven" "jnario-maven-plugin" "org.jnario.lib.maven" "jnario-maven-report-plugin" "jnario-maven-archetype"
do
cd plugins/$project
mvn versions:set -DnewVersion=$nextversion-SNAPSHOT -DgenerateBackupPoms=false
cd ../..
done
#commit and push to remote
git commit -s -a -m "new version $nextversion-SNAPSHOT"
git push
#checkout the release branch
git checkout rb-$version
#pick release BUILDQUALIFIER (eg, 20100924-1107) and update release branch to the release version
mvn -Dtycho.mode=maven org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=$version.$timestamp
#commit and tag your changes
git commit -s -a -m "new release $version"
git tag v$version
#git push --tags origin master
exit 1