Skip to content

Commit

Permalink
Teach Makefile.PL about where to get VERSION from
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christensen committed Nov 2, 2017
1 parent 29b7038 commit e4105da
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Makefile.PL
Expand Up @@ -705,6 +705,17 @@ EOF
# Check for extra needed libraries
extra_libs($realdir);

# if we are building from a git checkout, then set the VERSION based on the
# closest git tag, otherwise use the last hard-coded version

if (-d "./.git") {
$X{VERSION} = qx(git describe --tags --dirty);
chomp $X{VERSION};
}
else {
$X{VERSION} = $VERSION;
}

mk_initp(\%X);
delete $X{RPMBUILDDIR};
return \%X;
Expand Down

0 comments on commit e4105da

Please sign in to comment.