Matthias Sohn | 94953ac | 2014-05-21 15:27:34 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # script to create a jgit release |
| 4 | |
| 5 | # uncomment to switch on trace |
| 6 | #set -x |
| 7 | |
| 8 | # abort if a command hits an error |
| 9 | set -e |
| 10 | |
| 11 | export basePath=$(cd "$(dirname "$0")"; pwd) |
| 12 | echo basePath $basePath |
| 13 | |
| 14 | if [ -z $1 ]; then |
| 15 | echo " |
| 16 | Usage: |
| 17 | $ release.sh <release version tag> |
| 18 | |
| 19 | e.g. release.sh v3.4.0.201405051725-m7 |
| 20 | " |
| 21 | exit |
| 22 | fi |
| 23 | |
| 24 | # trimmed git status |
| 25 | export status=$(git status --porcelain) |
| 26 | |
| 27 | if [ ! -z "$status" ]; |
| 28 | then |
| 29 | echo " |
| 30 | working tree is dirty -> can't create release |
| 31 | " |
| 32 | exit |
| 33 | fi |
| 34 | |
| 35 | MSG="JGit $1" |
| 36 | |
| 37 | # tag release |
| 38 | git tag -s -m "$MSG" $1 |
| 39 | |
| 40 | # update version numbers |
| 41 | ./tools/version.sh --release |
| 42 | |
| 43 | # commit changed version numbers |
| 44 | git commit -a -s -m "$MSG" |
| 45 | |
| 46 | # move the tag to the version we release |
| 47 | git tag -sf -m "$MSG" $1 |
| 48 | |
| 49 | # run the build |
Matthias Sohn | e3b45f7 | 2016-05-04 17:33:40 +0200 | [diff] [blame] | 50 | mvn clean install -T 1C |
Matthias Sohn | 94953ac | 2014-05-21 15:27:34 +0200 | [diff] [blame] | 51 | mvn clean install -f org.eclipse.jgit.packaging/pom.xml |