File: release.sh

package info (click to toggle)
jgit 6.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 24,052 kB
  • sloc: java: 265,941; xml: 6,543; sh: 334; ruby: 100; python: 20; makefile: 6
file content (51 lines) | stat: -rwxr-xr-x 840 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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 <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 -T 1C
mvn clean install -f org.eclipse.jgit.packaging/pom.xml