diff options
author | Federico Ceratto <federico.ceratto@gmail.com> | 2016-03-30 21:40:42 +0000 |
---|---|---|
committer | Federico Ceratto <federico.ceratto@gmail.com> | 2016-03-30 21:40:42 +0000 |
commit | 9ce153ce7167c11adba8ac225edc7a707e97c6eb (patch) | |
tree | 9f6e849cce2dcc7e5b4e9e6252c843dc2d0787a2 /packaging/release-msg | |
download | netdata-9ce153ce7167c11adba8ac225edc7a707e97c6eb.tar.xz netdata-9ce153ce7167c11adba8ac225edc7a707e97c6eb.zip |
Imported Upstream version 1.0.0upstream/1.0.0
Diffstat (limited to '')
-rwxr-xr-x | packaging/release-msg | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/packaging/release-msg b/packaging/release-msg new file mode 100755 index 00000000..01ec3814 --- /dev/null +++ b/packaging/release-msg @@ -0,0 +1,59 @@ +#!/bin/bash + +# +# release-msg +# +scriptname=release-msg +if ! MYTMP=$(mktemp -d -t $scriptname-XXXXXX) +then + echo >&2 + echo >&2 + echo >&2 "Cannot create temporary directory." + echo >&2 + exit 1 +fi + +cleanup() { + status=$? + rm -rf "${MYTMP}" + exit $status +} + +# clean up if we get stopped by Crtl-C or forced logout or normal exit +trap cleanup INT +trap cleanup HUP +trap cleanup 0 + +set -e +if [ "$1" = "--debug" ] +then + set -x + shift +fi + +if [ $# -lt 1 ] +then + echo "Use only from .git/hooks/prepare-commit-msg" + exit 1 +fi + +if [ ! -x packaging/release-msg ] +then + echo "Must be run from base directory" + exit 1 +fi + +dirname="${0%/*}" +if [ "$dirname" = "$0" ]; then dirname="."; fi +source $dirname/packaging.functions + +mkdir -p $MYTMP/files +git show :configure.ac > $MYTMP/files/configure.ac +version=`get_configure_ac_version` +case "$(match_version $version)" in + prerelease|candidate|release) + sed -i -e "1s/.*/Prepare release $version/" "$1" + ;; +esac + +exit 0 |