File: bump-version-after-release

package info (click to toggle)
dh-make-perl 0.129
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,292 kB
  • sloc: perl: 5,640; makefile: 34; sh: 25
file content (17 lines) | stat: -rwxr-xr-x 521 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

# Copyright: 2022, gregor herrmann <gregoa@debian.org>
# License: same as dh-make-perl

set -eu

OLDVERSION=$(dpkg-parsechangelog --show-field Version)
MAJOR=$(echo "$OLDVERSION" | cut -d. -f1)
MINOR=$(echo "$OLDVERSION" | cut -d. -f2)
NEWVERSION="${MAJOR}.$(( $MINOR + 1 ))"

git grep 'our $VERSION' | cut -f1 -d: | uniq | xargs perl -pi -e "s{(our.+VERSION) = '$OLDVERSION';}{\$1 = '$NEWVERSION';}g"

dch --newversion $NEWVERSION '<dummy>'

git commit -a -m "bump VERSION after release" -m "Gbp-Dch: Ignore"