From: Eugene Crosser Date: Tue, 24 May 2022 20:52:06 +0000 (+0200) Subject: Make a `make-release` script to run `gbp dch` X-Git-Tag: 0.93~1 X-Git-Url: http://www.average.org/gitweb/?p=loctrkd.git;a=commitdiff_plain;h=2b2e567dd31e09228a4d5dd831d3166aa2910144 Make a `make-release` script to run `gbp dch` --- diff --git a/make-release b/make-release new file mode 100755 index 0000000..ca769c1 --- /dev/null +++ b/make-release @@ -0,0 +1,25 @@ +#!/bin/sh + +export DEBFULLNAME="`git config --get user.name`" +export DEBEMAIL="`git config --get user.email`" + +BRANCH=`git rev-parse --abbrev-ref HEAD` +FLAVOR="`dpkg-parsechangelog --show-field Distribution`" +LASTVER=`dpkg-parsechangelog --show-field Version` +NEWVER=$1 +if [ -z "$NEWVER" ]; then + echo "Specify the new version tag (old is $LASTVER)" >&2 + exit 1 +fi + +echo "new version $NEWVER, changes from $LASTVER on branch $BRANCH" + +gbp dch -s "$BRANCH" -D "$FLAVOR" -N "$NEWVER" -c --debian-branch="$BRANCH" --since="$LASTVER" +if [ $? -ne 0 ]; then + echo "Automatic update of debian/changelog failed" + exit 1 +fi +git tag "$NEWVER" + +echo "debian/changelog has been modified. Verify before \"git push\"!" +echo "Don't forget to check / push tags"