Skip to content

Commit

Permalink
Update get_dist_version() to consider any post-tag commits as being o…
Browse files Browse the repository at this point in the history
…n devel branch
  • Loading branch information
David Christensen committed Nov 3, 2017
1 parent 92c36ce commit 77c7d59
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Makefile.PL
Expand Up @@ -720,19 +720,21 @@ EOF
sub get_dist_version {
my $vers = $VERSION;
if (-d "./.git") {
$vers = qx(git describe --tags --dirty);
$vers = qx(git describe --tags);
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;
if ($4) {
$vers = sprintf '%d.%d.%d', $1, $2 + 1, 0;
$vers .= '-devel-' . $6 if $4;
}
else {
$vers = "$1.$2.$3";
}
}
elsif ($vers =~ /^(\d+)\.(\d+)\.(\d+)(-(\d+)-g(\w+))/) {
$vers = "$1.$2.$3-devel-$6";
$vers = sprintf '%d.%d.%d-devel-%s', $1, $2 + 1, 0, $6;
}
else {
# assuming this is \d+.\d+.\d+ for new tagging scenario
Expand Down

0 comments on commit 77c7d59

Please sign in to comment.