TT#127355 Add support for application versions

This should make it easier to see the application version in contrast to
the system modules version. We initialize this at build time from the
package version, and fallback to the module version if the application
has no usable version.

Change-Id: I4b4e1a926aea517b2b3b46261794e187af0c9865
mr10.0
Guillem Jover 5 years ago
parent aeeef2070b
commit b90ca3f3ac

7
debian/rules vendored

@ -1,7 +1,14 @@
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
%:
dh "$@"
execute_after_dh_install:
find debian/lib*-perl -name process.pl -print0 | \
xargs -0 sed -i \
-e 's/^our \$$VERSION = .*/our \$$VERSION = "$(DEB_VERSION)";/'

@ -36,6 +36,7 @@ our @EXPORT_OK = qw(
$system_instance_label
$local_ip
$local_fqdn
$application_version
$application_path
$executable_path
$working_path
@ -144,6 +145,7 @@ our $system_instance_label = 'some node';
our $local_ip = get_ipaddress();
our $local_fqdn = get_hostfqdn();
our $application_version = $main::VERSION // $VERSION;
our $application_path = get_applicationpath();
our $executable_path = $FindBin::Bin . '/';
#my $remotefilesystem = "MSWin32";

@ -8,6 +8,7 @@ use NGCP::BulkProcessor::Globals qw(
$system_version
$system_instance_label
$local_fqdn
$application_version
$application_path
$working_path
$executable_path
@ -172,6 +173,7 @@ sub _splashinfo {
my ($configfile) = @_;
configurationinfo($system_name . ' ' . $system_version . ' (' . $system_instance_label . ') [' . $local_fqdn . ']',getlogger(__PACKAGE__));
configurationinfo('application version: ' . $application_version,getlogger(__PACKAGE__));
configurationinfo('application path: ' . $application_path,getlogger(__PACKAGE__));
configurationinfo('working path: ' . $working_path,getlogger(__PACKAGE__));
configurationinfo($cpucount . ' cpu(s), multithreading ' . ($enablemultithreading ? 'enabled' : 'disabled'),getlogger(__PACKAGE__));

@ -4,6 +4,8 @@ use strict;
## no critic
our $VERSION = "0.0";
use File::Basename;
use Cwd;
use lib Cwd::abs_path(File::Basename::dirname(__FILE__) . '/../../../../../');

@ -2,6 +2,8 @@ use strict;
## no critic
our $VERSION = "0.0";
use File::Basename;
use Cwd;
use lib Cwd::abs_path(File::Basename::dirname(__FILE__) . '/../../../../../');

Loading…
Cancel
Save