summaryrefslogtreecommitdiffstats
path: root/lib/gitversion.pl
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2017-06-01 16:16:07 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2017-08-02 02:59:51 +0200
commit181d61462b93c3f3100dab0c2d2ee97d4bd41692 (patch)
treea9a83680c3b5a15bd9fdec1effe8ac43af6eb206 /lib/gitversion.pl
parentMerge pull request #886 from dwalton76/bgpd-vpn-multipath-zebra-update (diff)
downloadfrr-181d61462b93c3f3100dab0c2d2ee97d4bd41692.tar.xz
frr-181d61462b93c3f3100dab0c2d2ee97d4bd41692.zip
build: make gitversion more useful
Use --first-parent (i.e. mainline side of merge) and restrict to "frr-" tags. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/gitversion.pl')
-rw-r--r--lib/gitversion.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitversion.pl b/lib/gitversion.pl
index 8ddd9ffa5..2718046d0 100644
--- a/lib/gitversion.pl
+++ b/lib/gitversion.pl
@@ -4,7 +4,7 @@ use strict;
my $dir = shift;
chdir $dir || die "$dir: $!\n";
-my $gitdesc = `git describe --always --dirty || echo -- \"0-gUNKNOWN\"`;
+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";