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