Skip to content

Commit fed20fd

Browse files
author
Vladimir Kotal
committed
add release script
1 parent a59e1e3 commit fed20fd

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

dev/release.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
#
3+
# Trigger new release creation on Github.
4+
# Assumes working Maven + Git.
5+
#
6+
# see https://github.com/OpenGrok/opengrok/wiki/Release-process
7+
#
8+
9+
if (( $# != 1 )); then
10+
echo "usage: `basename $0` <version>"
11+
exit 1
12+
fi
13+
14+
VERSION=$1
15+
16+
if [[ ! -d $PWD/opengrok-indexer ]]; then
17+
echo "This needs to be run from top-level directory of the repository"
18+
exit 1
19+
fi
20+
21+
ver=$( git tag -l "$VERSION" )
22+
if (( $? != 0 )); then
23+
echo "Cannot determine tag"
24+
exit 1
25+
fi
26+
if [[ $ver == $VERSION ]]; then
27+
echo "Tag $VERSION already exists"
28+
exit 1
29+
fi
30+
31+
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=$VERSION && \
32+
git commit pom.xml **/pom.xml -m $VERSION && \
33+
git push && \
34+
git tag $VERSION
35+
git push origin tag $VERSION

0 commit comments

Comments
 (0)