[interchange] Normalize the version returned by the get_dist_version()

David Christensen interchange-cvs at icdevgroup.org
Fri Nov 3 15:18:58 UTC 2017


commit 23e84898a97db3f0236f33d7767da4aaa41a39a9
Author: David Christensen <david at endpoint.com>
Date:   Fri Nov 3 10:17:31 2017 -0500

    Normalize the version returned by the get_dist_version()

 Makefile.PL |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.PL b/Makefile.PL
index 372fc1d..91122f4 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -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;
 }
 



More information about the interchange-cvs mailing list