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)}
21 export EMAIL=ci@tinc-vpn.org
23 os="$ID-${VERSION_ID:-unknown}"
24 templates=$(dirname "$0")/debian
30 [[ -z $curr ]] && bail 'could not determine release version'
32 # get previous tag name
33 prev=$(find_tag "$curr"^)
34 [[ -z $curr ]] && bail 'could not determine previous release version'
36 # strip release prefix to get the current version number
37 version=${curr//release-/}
39 # prepare a new debian directory
40 dh_make --yes --single --createorig --copyright gpl2 --packagename "tinc_$version-$os"
42 # write all commit messages between two most recent tags to the changelog
43 gbp dch --since "$prev" --ignore-branch --spawn-editor=never --release
45 # replace placeholders with files copied from https://packages.debian.org/experimental/tinc
46 cp "$templates/"* debian/
48 # remove useless READMEs created by dh_make
51 dpkg-buildpackage -rfakeroot -us -uc -b