X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fissue.pl;h=f7345c8ef50cac93321d067acdd9ac34a05961b0;hb=5d77cab91d705fde9a580511732845327cbd0987;hp=6d2bfd34a9856fa1d8691659c464ded3ff919631;hpb=776d7bb9277c9d24708e297f240395b51b0aaa93;p=spider.git diff --git a/perl/issue.pl b/perl/issue.pl index 6d2bfd34..f7345c8e 100755 --- a/perl/issue.pl +++ b/perl/issue.pl @@ -2,7 +2,7 @@ # # create a version and build id for the project using git ids # -# $Id$ +# # # Copyright (c) 2007 Dirk Koopman, G1TLH # @@ -18,8 +18,9 @@ use strict; 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) = $desc =~ /^([\d.]+)(?:\.(\d+))?-(\d+)-/; +$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"; @@ -32,9 +33,10 @@ print F qq(# package main; -use vars qw(\$version \$build); +use vars qw(\$version \$subversion \$build); \$version = '$v'; +\$subversion = '$s'; \$build = '$b'; 1;