]> granicus.if.org Git - icinga2/blob - debian/updateversion
Enable unity build for RPM/Debian packages
[icinga2] / debian / updateversion
1 #!/bin/bash
2 ###
3 # Helper script to update the Debian changelog locally
4 ###
5
6 set -e
7 set -x
8
9 #VERSION=$(grep -E "^Version:" icinga2.spec | cut -d" " -f2)
10 VERSION=`git describe --abbrev=0 | sed 's/^v//' | grep -oP "^\d+\.\d+\.\d+(-.*)?" | sed 's/-/~/'`
11 DEB_VERSION_SUFFIX=$(echo "+icingasnap"`date +%Y%m%d%H%M`"."`git rev-parse --short HEAD`)
12
13 # update Debian version
14 dch "$@" --newversion "${VERSION}${DEB_VERSION_SUFFIX}" ""