summaryrefslogtreecommitdiff
path: root/debian/bin/do-dch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/bin/do-dch')
-rwxr-xr-xdebian/bin/do-dch26
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/bin/do-dch b/debian/bin/do-dch
new file mode 100755
index 000000000..da40d6bcb
--- /dev/null
+++ b/debian/bin/do-dch
@@ -0,0 +1,26 @@
+#!/bin/sh
+# This runs "gbp dch" with appropriate options.
+#
+# All given options are handed over to "gbp dch" without tampering. You
+# should probably give a --since="..." definition, so the program knows
+# were to start. Also, when you're planning on a release, pass `-R'. For
+# snapshots, use `-S'.
+#
+# This script also takes care of weeding out [dch-ignore] lines from the
+# generated changelog.
+#
+# At the end an editor is spawned on debian/changelog no matter what.
+
+gbp dch \
+ --spawn-editor=never \
+ "$@"
+
+old="debian/changelog.old"
+cl="debian/changelog"
+
+rm -f "$old"
+cp "$cl" "$old"
+sed -e '/^ \* \[[a-f0-9]*\] \[dch-ignored?\] /d' < "$old" > "$cl"
+rm -f "$old"
+
+${VISUAL:-${EDITOR:-vi}} "$cl"