Mailing List Archive

[interchange] Teach Makefile.PL about where to get VERSION from
commit e4105da0491ba5924518eef97cd0f86744d470b5
Author: David Christensen <david@endpoint.com>
Date: Thu Nov 2 14:22:46 2017 -0500

Teach Makefile.PL about where to get VERSION from

Makefile.PL | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.PL b/Makefile.PL
index 7852705..54973cd 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -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;

_______________________________________________
interchange-cvs mailing list
interchange-cvs@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-cvs