Skip to content

Commit

Permalink
Normalize the version returned by the get_dist_version()
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christensen committed Nov 3, 2017
1 parent 1b0af5b commit 23e8489
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Makefile.PL
Expand Up @@ -723,6 +723,20 @@ sub get_dist_version {
$vers = qx(git describe --tags --dirty);
chomp $vers;
}
# XXX do we want to increment revision number if we're not a tagged release,
# so anything tagged after 5.12 will display as 5.13 for devel release?

# standardize/handle old tagged REL tags
if ($vers =~ /^REL_(\d+)_(\d+)_(\d+)(-(\d+)-g(\w+))/) {
$vers = "$1.$2.$3";
$vers .= '-devel-' . $6 if $4;
}
elsif ($vers =~ /^(\d+)\.(\d+)\.(\d+)(-(\d+)-g(\w+))/) {
$vers = "$1.$2.$3-devel-$6";
}
else {
# assuming this is \d+.\d+.\d+ for new tagging scenario
}
$vers;
}

Expand Down

0 comments on commit 23e8489

Please sign in to comment.