Adjust VERSION string on the fly during package build

Adjusting version strings manually is known to be error prone and
annoying, so lets set the version string during package builds
so the version matches exactly the Debian package version.

Acked-by: Daniel Tiefnig <dtiefnig@sipwise.com>

From: Michael Prokop <mprokop@sipwise.com>
3.5
Michael Prokop 14 years ago
parent 8629a4b26b
commit 3349162e16

4
debian/rules vendored

@ -10,11 +10,14 @@
#export DH_VERBOSE=1
b=$(CURDIR)/debian/build
VERSION:=$(shell dpkg-parsechangelog | awk '/Version: / { print $$2 }')
build: build-stamp
build-stamp:
dh_testdir
egrep -q "VERSION = 'UNRELEASED'" lib/csc.pm || \
(echo "Wrong version in lib/csc.pm" && exit 2)
mkdir -p pro/etc/ngcp-www-csc pro/etc/apache2/sites-available
mkdir -p ce/etc/ngcp-www-csc ce/etc/apache2/sites-available
tpage --define PRO=true etc/csc.conf > pro/etc/ngcp-www-csc/csc.conf.tt2
@ -44,6 +47,7 @@ ngcp-www-csc:
dh_installdocs -p$@ -P$(b)/$@
dh_installchangelogs -p$@ -P$(b)/$@
dh_install -p$@ -P$(b)/$@
sed -i -e "s/VERSION = 'UNRELEASED'/VERSION = '$(VERSION)'/" $(b)/$@/usr/share/ngcp-www-csc/lib/csc.pm
dh_installexamples -p$@ -P$(b)/$@
dh_installman -p$@ -P$(b)/$@
dh_link -p$@ -P$(b)/$@

@ -21,7 +21,7 @@ use Catalyst qw/ConfigLoader Static::Simple Unicode I18N
Session Session::Store::FastMmap Session::State::Cookie
/;
our $VERSION = '3';
our $VERSION = 'UNRELEASED';
# Configure the application.
#

Loading…
Cancel
Save