summaryrefslogtreecommitdiff
path: root/debian/bin/do-dch
blob: da40d6bcbf889d358174b6cc12f51b7f194bd889 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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"