projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix IPV4 handling on non-IPV6 capable hosts
[spider.git]
/
perl
/
issue.pl
diff --git
a/perl/issue.pl
b/perl/issue.pl
index 6d2bfd34a9856fa1d8691659c464ded3ff919631..065c9abdc1971546d8e198d009c9b7e84ba5e13f 100755
(executable)
--- a/
perl/issue.pl
+++ b/
perl/issue.pl
@@
-2,7
+2,7
@@
#
# create a version and build id for the project using git ids
#
#
# create a version and build id for the project using git ids
#
-#
$Id$
+#
#
# Copyright (c) 2007 Dirk Koopman, G1TLH
#
#
# Copyright (c) 2007 Dirk Koopman, G1TLH
#
@@
-18,8
+18,9
@@
use strict;
use vars qw($root);
my $fn = "$root/perl/Version.pm";
use vars qw($root);
my $fn = "$root/perl/Version.pm";
-my $desc = `git-describe`;
-my ($v, $b) = $desc =~ /^([\d.]+)-(\d+)-/;
+my $desc = `git describe --long`;
+my ($v, $s, $b, $g) = $desc =~ /^([\d.]+)(?:\.(\d+))?-(\d+)-g([0-9a-f]+)/;
+$s ||= '0'; # account for missing subversion
$b++; # to account for the commit that is about to happen
open F, ">$fn" or die "issue.pl: can't open $fn $!\n";
$b++; # to account for the commit that is about to happen
open F, ">$fn" or die "issue.pl: can't open $fn $!\n";
@@
-32,10
+33,12
@@
print F qq(#
package main;
package main;
-use vars qw(\$version \$
build
);
+use vars qw(\$version \$
subversion \$build \$gitversion
);
\$version = '$v';
\$version = '$v';
+\$subversion = '$s';
\$build = '$b';
\$build = '$b';
+\$gitversion = '$g';
1;
);
1;
);