13 git describe --always --tags --match='release-*' "$@"
16 export DEBIAN_FRONTEND=noninteractive
18 apt-get install -y devscripts git-buildpackage dh-make
20 export USER=${USER:-$(whoami)}
23 templates=$(dirname "$0")/debian
29 [[ -z $curr ]] && bail 'could not determine release version'
31 # get previous tag name
32 prev=$(find_tag "$curr"^)
33 [[ -z $curr ]] && bail 'could not determine previous release version'
35 # strip release prefix to get the current version number
36 version=${curr//release-/}
38 # prepare a new debian directory
39 dh_make --yes --single --createorig --copyright gpl2 --packagename "tinc_$version-$os"
41 # write all commit messages between two most recent tags to the changelog
42 gbp dch --since "$prev" --ignore-branch --spawn-editor=never --release
44 # replace placeholders with files copied from https://packages.debian.org/experimental/tinc
45 cp "$templates/"* debian/
47 # remove useless READMEs created by dh_make
50 dpkg-buildpackage -d -us -uc