[quagga-dev 10285] [PATCH] build: fix minimal mixup in gitinfo suffix

David Lamparter equinox at opensourcerouting.org
Wed Feb 27 10:34:41 GMT 2013


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 at opensourcerouting.org>
---
 lib/gitversion.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/gitversion.pl b/lib/gitversion.pl
index 448f13d..8ddd9ff 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;
-- 
1.7.12.4





More information about the Quagga-dev mailing list