Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
fix parse for tags w/ double digit patch numbers #3
Conversation
natefinch
reviewed
Jun 3, 2016
| @@ -45,14 +45,13 @@ func (*suite) TestCompare(c *gc.C) { | ||
| {"2.0.0.0", "2.0.0.0", 0}, | ||
| {"2.0.0.1", "2.0.0.0", 1}, | ||
| {"2.0.1.10", "2.0.0.0", 1}, | ||
| - {"2.0-_0", "2.0-00", 1}, |
natefinch
Jun 3, 2016
Contributor
this was removed because 2.0-00 is not actually a valid version, so it errors out (it has a zero length tag specified). It used to work because the tag was getting parsed as "0"
natefinch
reviewed
Jun 3, 2016
| @@ -106,6 +105,9 @@ var parseTests = []struct { | ||
| v: "1.21-alpha1.1", | ||
| expect: version.Number{Major: 1, Minor: 21, Patch: 1, Tag: "alpha", Build: 1}, | ||
| +}, { | ||
| + v: "1.21-alpha10", |
|
LGTM. Lets make the tag match just |
natefinch
merged commit 4ae6172
into
juju:master
Jun 3, 2016
added a commit
to babbageclunk/version
that referenced
this pull request
Sep 15, 2016
babbageclunk
referenced this pull request
in juju/charm
Sep 15, 2016
Merged
Update test to match changed juju/version behaviour #219
added a commit
to juju/charm
that referenced
this pull request
Sep 15, 2016
added a commit
that referenced
this pull request
Sep 16, 2016
added a commit
that referenced
this pull request
Sep 16, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
natefinch commentedJun 3, 2016
•
Edited 1 time
-
natefinch
Jun 3, 2016
Turns out the tag group (\w+) would consume all but the last digit of the patch, because \w+ matches numbers as well as letters. In talking to Martin, we're pretty sure we don't need to match anything but a-z for the tag name, so I changed it to that, and fixed the tests to match this assumption.