From: Hugo van der Sanden Date: Fri, 2 Nov 2012 10:39:34 +0000 (+0000) Subject: Detect empty git tag in cmpVERSION X-Git-Tag: v5.17.6~233 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/0f85f13d60e8a8fb2d8340c74bfddb3a2a0bdf85?ds=sidebyside Detect empty git tag in cmpVERSION --- diff --git a/Porting/cmpVERSION.pl b/Porting/cmpVERSION.pl index 97c78b2..36128bb 100755 --- a/Porting/cmpVERSION.pl +++ b/Porting/cmpVERSION.pl @@ -43,6 +43,13 @@ unless (defined $tag_to_compare) { chomp $tag_to_compare; } +unless (length $tag_to_compare) { + die "$0: Git found, but no Git tags found\n" + unless $tap; + print "1..0 # SKIP: Git found, but no Git tags found\n"; + exit 0; +} + my $tag_exists = `git --no-pager tag -l $tag_to_compare 2>$null`; chomp $tag_exists;