File: do-dch

package info (click to toggle)
zsh 5.9-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 22,872 kB
  • sloc: ansic: 108,165; sh: 6,987; makefile: 722; perl: 687; awk: 291; sed: 16
file content (26 lines) | stat: -rwxr-xr-x 709 bytes parent folder | download | duplicates (5)
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"