From 7ebeead9586fb097a8d2e7554440f96a5688a266 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Wed, 21 May 2014 17:26:02 +0200 Subject: [PATCH] Add script to create EGit release Change-Id: I39da37f11242afdb328aaa821eb54e3557e3b15e Signed-off-by: Matthias Sohn --- tools/release.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 tools/release.sh diff --git a/tools/release.sh b/tools/release.sh new file mode 100755 index 000000000..ef167da4d --- /dev/null +++ b/tools/release.sh @@ -0,0 +1,51 @@ +#!/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 + + 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="EGit $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 + -- 2.11.4.GIT