summaryrefslogtreecommitdiff
path: root/debian/do-dch
blob: cf3a89a84c94613b55a1d5c18a0797f1f9ddb662 (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
27
28
29
30
#!/bin/sh
# This runs git-dch with appropriate options.
#
# All given options are handed over to git-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.

git-dch \
    --debian-branch=debian \
    --id-length=8 \
    --multimaint-merge \
    --upstream-tag='zsh-%(version)' \
    --spawn-editor=never \
    "$@"

old="debian/changelog.old"
cl="debian/changelog"

rm -f "$old"
cp "$cl" "$old"
sed -e '/^  \* \[[a-f0-9]*\] \[dch-ignore\] /d' < "$old" > "$cl"
rm -f "$old"

${VISUAL:-${EDITOR:-vi}} "$cl"