summaryrefslogtreecommitdiff
path: root/bin/debrel
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-07-27 14:13:44 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-07-27 17:37:02 -0700
commit89b7779224ac25b29a46c5efabf65d4171617181 (patch)
treef479e1717b46b04fac27ca5bc61d043d306399ed /bin/debrel
parent7b860884ded147131cff405996b7d2ad58ca72dc (diff)
downloaddotfiles-89b7779224ac25b29a46c5efabf65d4171617181.tar.gz
debrel: debrebase before push-source
See dgit-maint-debrebase(7).
Diffstat (limited to 'bin/debrel')
-rwxr-xr-xbin/debrel8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/debrel b/bin/debrel
index 090f045e..4d0678d1 100755
--- a/bin/debrel
+++ b/bin/debrel
@@ -22,6 +22,14 @@ if [ "$(dpkg-parsechangelog -SDistribution)" = "UNRELEASED" ]; then
git commit --include debian/changelog \
-m"finalise changelog for $(dpkg-parsechangelog -SVersion) upload"
fi
+
+# this is not a general test for whether a package is being maintained with
+# git-debrebase, but it will ensure the `dch -r` commit is behind the patch
+# queue in most cases
+if git show-ref | grep -q "refs/ffq-prev\\|refs/debrebase-last"; then
+ git debrebase
+fi
+
dgit push-source "$@"
git push --follow-tags