Re: [interchange] Normalize the version returned by the get_dist_version()
David Christensen <[email protected]> Fri, 3 Nov 2017 14:00:35 -0500
| Newsgroups | gmane.comp.web.interchange.users |
|---|---|
| Message-ID | <[email protected]> |
> On Nov 3, 2017, at 1:48 PM, Peter <[email protected]> wrote: > > On 04/11/17 04:18, David Christensen wrote: >> + # standardize/handle old tagged REL tags >> + if ($vers =~ /^REL_(\d+)_(\d+)_(\d+)(-(\d+)-g(\w+))/) { >> + $vers = "$1.$2.$3"; >> + $vers .= '-devel-' . $6 if $4; > > The "if $4" is redundant here, because the regex above won't match at > all without it. You probably want to make the $4 grouping optional by > following it with a "?" in the regex. Yeah, that was an earlier revision, cleaned some things up more since then. >> + } >> + elsif ($vers =~ /^(\d+)\.(\d+)\.(\d+)(-(\d+)-g(\w+))/) { >> + $vers = "$1.$2.$3-devel-$6"; >> + } > > In both of the above you're donking the commit counter (the $5 part). > I'd like to go on record saying that I like that part of the version > number because it gives an easily human-readable way to determine if a > particular commit is older or newer. Okay, makes sense; the original motivation for transforming from git’s native format was MakeMaker was complaining about not being able to parse the version. I think that would have been the REL_… part though, so I’ll see if I can get that reintroduced. Best, David -- David Christensen End Point Corporation [email protected] 785-727-1171 _______________________________________________ interchange-users mailing list [email protected] http://www.icdevgroup.org/mailman/listinfo/interchange-users
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEECKA1l4YEfF4eK4/eN0ojyd+bZbgFAln8vNMACgkQN0ojyd+b Zbj9cBAAmqvghAyKQ6mMLOme2ewfqQ9B0D/jubJbIgLzhh1AOs1a1F9qYkZmBLz4 fYbWTC1Ak3I5ZDRT5fHGSyKNvEiDnhGdXFR6rYIUc52UT+3OEdl2Lb7WEEysi/ei CKCYD88Xowp4/EK4Zf4fbngJYAsJEZPxhgE9uxOCnxhVQt11iY3P/YLZbmVAlO7p 2dYdTjLTa1o9P0yO+RPDKbSDv42ilZ37T6hN096HkLHIJueWSpyH3VTX1u1QgHdm OeD8iu6K/O7whHOB4mcVoeinmDYlMTDmk7v4Qa+VDpBpm6hrKyPnrBZm+W1uGMht dsyQ619O3FYcqUy25bZzVtzd0KxP99UpVxjEVJ6bgnTadGQPL4Ah2q0EOHpbRAvr pL+cG42Mza2DxdmxX3H6ZgafVm7n3NxlKU0DE/VJ2VCudVGWlSntEFsyOEpfx3pG 4A5AWKBP8tKK6RpZzXoDGeujP6b8lbKJ2HDYVPmA21rx9jhsYAk7zBRpSQuhsqBc E7VBULzvT5rggrT+ksP+vd5cN1q+7BXKzlUJrP7meAyeOO3hwMLYqrOob8tKKA/I skTBEa61bcmo7XK9eoYiG30WC7UCjsTI3TXeinIrN4hePEdHfPWCwIIE2UpsYV3i /G0rs8HgMbmfaroPV4sakoiS0FFd4P6N33z1gCadq8HTTAIyO7k= =m9// -----END PGP SIGNATURE-----