diff options
Diffstat (limited to '')
-rwxr-xr-x | bin/git-debian-release | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/bin/git-debian-release b/bin/git-debian-release new file mode 100755 index 0000000..9a7b4b7 --- /dev/null +++ b/bin/git-debian-release @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e + +GBP_CONF_FILES="/dev/null" +export GBP_CONF_FILES + +if [ -n "$(git config --get user.signingKey)" ] +then + GIT_OPTIONS="-S" +fi + +if [ ! -e debian/changelog ] +then + echo "E: debian/changelog - no such file" >&2 + exit 1 +fi + +MODE="$(basename ${0} | sed -e 's|^git-||' -e 's|-release$||')" + +if [ -n "${1}" ] +then + VERSION="${1}" +else + VERSION="$(dpkg-parsechangelog | awk '/^Version: / { print $2 }')" +fi + +HASH="${2}" + +git add -A + +git commit -a -s -m "Releasing ${MODE} version ${VERSION}." ${GIT_OPTIONS} +git-${MODE}-tag ${VERSION} ${HASH} |