Merge branch 'stable-4.0'
[egit/eclipse.git] / tools / release.sh
blobef167da4d893fd62251d0ea9c16a01a33380ef5f
1 #!/bin/bash
3 # script to create a jgit release
5 # uncomment to switch on trace
6 #set -x
8 # abort if a command hits an error
9 set -e
11 export basePath=$(cd "$(dirname "$0")"; pwd)
12 echo basePath $basePath
14 if [ -z $1 ]; then
15 echo "
16 Usage:
17 $ release.sh <release version tag>
19 e.g. release.sh v3.4.0.201405051725-m7
21 exit
24 # trimmed git status
25 export status=$(git status --porcelain)
27 if [ ! -z "$status" ];
28 then
29 echo "
30 working tree is dirty -> can't create release
32 exit
35 MSG="EGit $1"
37 # tag release
38 git tag -s -m "$MSG" $1
40 # update version numbers
41 ./tools/version.sh --release
43 # commit changed version numbers
44 git commit -a -s -m "$MSG"
46 # move the tag to the version we release
47 git tag -sf -m "$MSG" $1
49 # run the build
50 mvn clean install