make $admin::VERSION UNIVERSAL-compatible

a packages VERSION variable is subject to a quite strict syntax wich
does not really allow to pack SVN revisions and build-numbers in it.

add $admin::BUILD_VERSION to enable a more build-oriented 
version-number/build-identifier that will also be shown in the 
footer of pages.
3.4
Christian Veigl 14 years ago
parent b8e7a0b485
commit e76278425e

@ -21,7 +21,11 @@ use Catalyst qw/ConfigLoader Static::Simple Unicode
Session Session::Store::FastMmap Session::State::Cookie
/;
our $VERSION = 'UNRELEASED';
# $VERSION and $BUILD_VERSION will be set during the build-process of the debian package
# In addition to the known $VERSION the variable $BUILD_VERSION may contain more information
# about the build. A much more relaxed syntax is possible here. See also: debian/rules.
our $VERSION = 'VERSION';
our $BUILD_VERSION = 'BUILD_VERSION';
# Configure the application.
#

@ -31,6 +31,8 @@ Verify user is logged in.
sub auto : Private {
my ($self, $c) = @_;
$c->stash->{build_version} = $admin::BUILD_VERSION;
if ($c->controller =~ /^admin::Controller::Root\b/
or $c->controller =~ /^admin::Controller::login\b/)
{

@ -1,7 +1,7 @@
<!-- BEGIN layout/footer -->
<div id="footer" class="span-24 last">
<p>
NGCP www_admin version [% Catalyst.VERSION %] -
NGCP www_admin version [% build_version %] -
Copyright 2007-2012 Sipwise GmbH, Austria.<br />
<a href="http://sipwise.com/">www.sipwise.com</a>
</p>

Loading…
Cancel
Save