summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2020-01-17 15:53:47 +0100
committerDavid Lamparter <equinox@diac24.net>2020-01-17 15:54:50 +0100
commit7fb434ef85846a9c893cf5d428b19150467892dd (patch)
tree8e90c66979b8245d4e258e780a94ef62c6797118
parentd60693fdf82c8c8d6d7923ea3b2c1326ece6216d (diff)
build: fix auto git ID length
This script was written back when `git describe` would abbreviate to 7-char commit IDs; they're longer now and we're grabbing the tail end... Signed-off-by: David Lamparter <equinox@diac24.net>
-rw-r--r--lib/gitversion.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitversion.pl b/lib/gitversion.pl
index 2718046d0b..dd25c8976a 100644
--- a/lib/gitversion.pl
+++ b/lib/gitversion.pl
@@ -6,7 +6,7 @@ chdir $dir || die "$dir: $!\n";
my $gitdesc = `git describe --always --first-parent --tags --dirty --match 'frr-*' || echo -- \"0-gUNKNOWN\"`;
chomp $gitdesc;
-my $gitsuffix = ($gitdesc =~ /([0-9a-fA-F]{7}(-dirty)?)$/) ? "-g$1" : "-gUNKNOWN";
+my $gitsuffix = ($gitdesc =~ /-g([0-9a-fA-F]+(-dirty)?)$/) ? "-g$1" : "-gUNKNOWN";
printf STDERR "git suffix: %s\n", $gitsuffix;
printf "#define GIT_SUFFIX \"%s\"\n", $gitsuffix;