diff options
author | Simo Sorce <simo@redhat.com> | 2016-06-17 10:40:11 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2016-06-17 11:01:36 -0400 |
commit | b1f2772cf70f860594d2e22459e54a15342a508e (patch) | |
tree | 2a8a0077a2e9a127128c722cb0c2c39c50e41223 | |
parent | a293d82069c7e4498efb6707be8b9203f7bbfa59 (diff) | |
download | mod_auth_gssapi-b1f2772cf70f860594d2e22459e54a15342a508e.tar.gz mod_auth_gssapi-b1f2772cf70f860594d2e22459e54a15342a508e.tar.xz mod_auth_gssapi-b1f2772cf70f860594d2e22459e54a15342a508e.zip |
Add release script
This automates release prepping a bit.
Signed-off-by: Simo Sorce <simo@redhat.com>
-rwxr-xr-x | contrib/release.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/contrib/release.sh b/contrib/release.sh new file mode 100755 index 0000000..a224212 --- /dev/null +++ b/contrib/release.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# Relase-prep script + +if [[ $# -eq 0 ]]; then + echo "Version number is required" + exit 1 +fi +if [[ $# -gt 1 ]]; then + echo "Only one argument (version) is allowed" + exit 2 +fi + +RELEASE=$1 +CUR_RELTAG=`git tag -l | tail -1` +NEW_RELTAG=v${RELEASE} + +echo "Prepping for release ${RELEASE}" + +cat <<EOF > version.m4 +m4_define([VERSION_NUMBER], [${RELEASE}]) +EOF + +git commit version.m4 -s -m "Release ${RELEASE}" + +git tag ${NEW_RELTAG} + +autoreconf -f -i && ./configure && make DESTDIR=${PWD}/testinst && make dist +if [[ $? -ne 0 ]]; then + echo "Release prep failed" + exit 3 +fi + +sha512sum mod_auth_gssapi-$1.tar.gz > mod_auth_gssapi-$1.tar.gz.shas512sum.txt +git shortlog ${CUR_RELTAG}..${NEW_RELTAG} | sed 's/^\([a-Z]\)\(.*\)/* \1\2/' > shortlog.txt +echo "Release ready to be pushed" |