blob: d180bdf59e562a1f0a83ae3454c86ee372e820c3 [file] [log] [blame]
Matthias Sohn94953ac2014-05-21 15:27:34 +02001#!/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
9set -e
10
11export basePath=$(cd "$(dirname "$0")"; pwd)
12echo basePath $basePath
13
14if [ -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
22fi
23
24# trimmed git status
25export status=$(git status --porcelain)
26
27if [ ! -z "$status" ];
28then
29 echo "
30 working tree is dirty -> can't create release
31"
32 exit
33fi
34
35MSG="JGit $1"
36
37# tag release
38git tag -s -m "$MSG" $1
39
40# update version numbers
41./tools/version.sh --release
42
43# commit changed version numbers
44git commit -a -s -m "$MSG"
45
46# move the tag to the version we release
47git tag -sf -m "$MSG" $1
48
49# run the build
Matthias Sohne3b45f72016-05-04 17:33:40 +020050mvn clean install -T 1C
Matthias Sohn94953ac2014-05-21 15:27:34 +020051mvn clean install -f org.eclipse.jgit.packaging/pom.xml