summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2013-02-27 11:24:24 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2013-04-09 17:05:08 +0200
commit4a014580ff85428aa41b28503554b2ce982805be (patch)
treeb66414d21e1a19ab65b34682b2027de349f5d291 /lib
parentb58c90807c9d0bfa9601704c7490a16070906004 (diff)
build: fix minimal mixup in gitinfo suffix
the original version of this had issues with tagless repositories; to fix that I removed the "-g" part from one of the regexes. I then failed to add those 2 characters back, leading to version numbers like "0.99.220123456" instead of "0.99.22-ga123456". Let's put the "-g" back... Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/gitversion.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitversion.pl b/lib/gitversion.pl
index 448f13d6..8ddd9ffa 100644
--- a/lib/gitversion.pl
+++ b/lib/gitversion.pl
@@ -6,7 +6,7 @@ chdir $dir || die "$dir: $!\n";
my $gitdesc = `git describe --always --dirty || echo -- \"0-gUNKNOWN\"`;
chomp $gitdesc;
-my $gitsuffix = ($gitdesc =~ /([0-9a-fA-F]{7}(-dirty)?)$/) ? $1 : "-gUNKNOWN";
+my $gitsuffix = ($gitdesc =~ /([0-9a-fA-F]{7}(-dirty)?)$/) ? "-g$1" : "-gUNKNOWN";
printf STDERR "git suffix: %s\n", $gitsuffix;
printf "#define GIT_SUFFIX \"%s\"\n", $gitsuffix;