This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Get the tag from git describe instead of $]
authorAbigail <abigail@abigail.be>
Tue, 1 Feb 2011 12:26:22 +0000 (13:26 +0100)
committerAbigail <abigail@abigail.be>
Tue, 1 Feb 2011 12:26:22 +0000 (13:26 +0100)
t/porting/cmp_version.t

index 9968082..ec2989b 100644 (file)
@@ -30,9 +30,10 @@ if (! -d '.git' ) {
 }
 
 #
 }
 
 #
-# Assume at this point, the version hasn't bumped.
+# Thanks to David Golden for this suggestion.
 #
 #
-my $tag_to_compare = version -> parse ($]) -> normal;
+my $tag_to_compare = `git describe --abbrev=0`;
+chomp $tag_to_compare;
 my $source_dir = '.';
 
 my $null = $^O eq 'MSWin32' ? 'nul' : '/dev/null';
 my $source_dir = '.';
 
 my $null = $^O eq 'MSWin32' ? 'nul' : '/dev/null';