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

David Christensen david at endpoint.com
Fri Nov 3 19:00:35 UTC 2017


> On Nov 3, 2017, at 1:48 PM, Peter <peter at pajamian.dhs.org> 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
david at endpoint.com
785-727-1171



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.icdevgroup.org/pipermail/interchange-users/attachments/20171103/9b2dc7e3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://www.icdevgroup.org/pipermail/interchange-users/attachments/20171103/9b2dc7e3/attachment.pgp>


More information about the interchange-users mailing list