add logging of PC92A ip addresses
[spider.git] / perl / issue.pl
1 #!/usr/bin/perl
2 #
3 # create a version and build id for the project using git ids
4 #
5 #
6 #
7 # Copyright (c) 2007 Dirk Koopman, G1TLH
8 #
9
10 # Determine the correct place to put stuff
11 BEGIN {
12         # root of directory tree for this system
13         $root = "/spider";
14         $root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
15 }
16
17 use strict;
18
19 use vars qw($root);
20 my $fn = "$root/perl/Version.pm";
21 my $desc = `git describe --long`;
22 my ($v, $s, $b) = $desc =~ /^([\d.]+)(?:\.(\d+))?-(\d+)-/;
23 $s ||= '0';             # account for missing subversion
24 $b++;                   # to account for the commit that is about to happen
25
26 open F, ">$fn" or die "issue.pl: can't open $fn $!\n";
27 print F qq(#
28 # Version information for DXSpider
29 #
30 # DO NOT ALTER THIS FILE. It is generated automatically
31 # and will be overwritten
32 #
33
34 package main;
35
36 use vars qw(\$version \$subversion \$build);
37
38 \$version = '$v';
39 \$subversion = '$s';
40 \$build = '$b';
41
42 1;
43 );