diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2014-05-21 15:27:34 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2014-05-21 20:10:19 +0200 |
commit | 94953ac9cafe4ec632fff3510c926a78ff551e54 (patch) | |
tree | 4f79653b28ab6ac9df11d6cf92bad8f562d30df7 /tools | |
parent | 4cb0bd8a43a8f09f8d7a1684870c5e6797f428d6 (diff) | |
download | jgit-94953ac9cafe4ec632fff3510c926a78ff551e54.tar.gz jgit-94953ac9cafe4ec632fff3510c926a78ff551e54.zip |
Add script to create JGit release
Change-Id: I620a209406dd021f3e8e1dafcfb381631dfd25d2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/release.sh | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tools/release.sh b/tools/release.sh new file mode 100755 index 0000000000..7adb3758c0 --- /dev/null +++ b/tools/release.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# +# script to create a jgit release + +# uncomment to switch on trace +#set -x + +# abort if a command hits an error +set -e + +export basePath=$(cd "$(dirname "$0")"; pwd) +echo basePath $basePath + +if [ -z $1 ]; then + echo " + Usage: + $ release.sh <release version tag> + + e.g. release.sh v3.4.0.201405051725-m7 +" + exit +fi + +# trimmed git status +export status=$(git status --porcelain) + +if [ ! -z "$status" ]; +then + echo " + working tree is dirty -> can't create release +" + exit +fi + +MSG="JGit $1" + +# tag release +git tag -s -m "$MSG" $1 + +# update version numbers +./tools/version.sh --release + +# commit changed version numbers +git commit -a -s -m "$MSG" + +# move the tag to the version we release +git tag -sf -m "$MSG" $1 + +# run the build +mvn clean install +mvn clean install -f org.eclipse.jgit.packaging/pom.xml + |