Update semver to latest
...because gps needs both the rev and version (branch) in order to
preserve what a lock requests.
diff --git a/glide.lock b/glide.lock
index e46c890..49bed7b 100644
--- a/glide.lock
+++ b/glide.lock
@@ -1,12 +1,12 @@
-hash: 0653c17bcbf6f1df79990f3d2211dbcbc920ca528c513b00f5cab0a508c984ab
-updated: 2016-06-30T10:51:49.633776379-04:00
+hash: 7b0d46d2b21d5d8ff24023a402285f87b14b9f554ae52913cc7ea08bfd17453d
+updated: 2016-07-13T23:09:11.03428654-04:00
imports:
- name: github.com/armon/go-radix
version: 4239b77079c7b5d1243b7b4736304ce8ddb6f0f2
- name: github.com/codegangsta/cli
version: 71f57d300dd6a780ac1856c005c4b518cfd498ec
- name: github.com/Masterminds/semver
- version: 0a2c9fc0eee2c4cbb9526877c4a54da047fdcadd
+ version: b3ef6b1808e9889dfb8767ce7068db923a3d07de
- name: github.com/Masterminds/vcs
version: fbe9fb6ad5b5f35b3e82a7c21123cfc526cbf895
- name: github.com/sdboyer/gps
diff --git a/vendor/github.com/Masterminds/semver/README.md b/vendor/github.com/Masterminds/semver/README.md
index 1edec7a..aa133ea 100644
--- a/vendor/github.com/Masterminds/semver/README.md
+++ b/vendor/github.com/Masterminds/semver/README.md
@@ -7,15 +7,13 @@
* Check if a semantic version fits within a set of constraints
* Optionally work with a `v` prefix
-[](https://travis-ci.org/Masterminds/semver) [](https://ci.appveyor.com/project/mattfarina/semver/branch/master) [](https://godoc.org/github.com/Masterminds/semver) [](https://goreportcard.com/report/github.com/Masterminds/semver)
+[](https://travis-ci.org/Masterminds/semver) [](https://ci.appveyor.com/project/mattfarina/semver/branch/master) [](https://godoc.org/github.com/Masterminds/semver) [](http://goreportcard.com/report/Masterminds/semver)
## Parsing Semantic Versions
To parse a semantic version use the `NewVersion` function. For example,
-```go
v, err := semver.NewVersion("1.2.3-beta.1+build345")
-```
If there is an error the version wasn't parseable. The version object has methods
to get the parts of the version, compare it to other versions, convert the
@@ -27,7 +25,6 @@
A set of versions can be sorted using the [`sort`](https://golang.org/pkg/sort/)
package from the standard library. For example,
-```go
raw := []string{"1.2.3", "1.0", "1.3", "2", "0.4.2",}
vs := make([]*semver.Version, len(raw))
for i, r := range raw {
@@ -40,14 +37,12 @@
}
sort.Sort(semver.Collection(vs))
-```
## Checking Version Constraints
Checking a version against version constraints is one of the most featureful
parts of the package.
-```go
c, err := semver.NewConstraint(">= 1.2.3")
if err != nil {
// Handle constraint not being parseable.
@@ -59,7 +54,6 @@
}
// Check if the version meets the constraints. The a variable will be true.
a := c.Check(v)
-```
## Basic Comparisons
@@ -125,7 +119,6 @@
against a constraint. When validation fails a slice of errors containing why a
version didn't meet the constraint is returned. For example,
-```go
c, err := semver.NewConstraint("<= 1.2.3, >= 1.4")
if err != nil {
// Handle constraint not being parseable.
@@ -146,7 +139,6 @@
// "1.3 is greater than 1.2.3"
// "1.3 is less than 1.4"
}
-```
# Contribute
diff --git a/vendor/github.com/Masterminds/semver/constraints_test.go b/vendor/github.com/Masterminds/semver/constraints_test.go
index 32ad99b..6b09d73 100644
--- a/vendor/github.com/Masterminds/semver/constraints_test.go
+++ b/vendor/github.com/Masterminds/semver/constraints_test.go
@@ -166,11 +166,28 @@
{"<=1.1", "0.1.0", true},
{"<=1.1", "1.1.0", true},
{"<=1.1", "1.1.1", false},
+ {"<=1.1-alpha1", "1.1", false},
+ {"<=2.x", "3.0.0", false},
+ {"<=2.x", "2.9.9", true},
+ {"<2.x", "2.0.0", false},
+ {"<2.x", "1.9.9", true},
+ {">=2.x", "3.0.0", true},
+ {">=2.x", "2.9.9", true},
+ {">=2.x", "1.9.9", false},
+ {">2.x", "3.0.0", true},
+ {">2.x", "2.9.9", false},
+ {">2.x", "1.9.9", false},
+ // TODO these are all pending the changes in #10
+ //{"<=2.x-beta1", "3.0.0-alpha2", false},
+ //{">2.x-beta1", "3.0.0-alpha2", true},
//{"<2.0.0", "2.0.0-alpha1", false},
//{"<=2.0.0", "2.0.0-alpha1", true},
}
for _, tc := range tests {
+ if testing.Verbose() {
+ t.Logf("Testing if %q allows %q", tc.constraint, tc.version)
+ }
c, err := parseConstraint(tc.constraint)
if err != nil {
t.Errorf("err: %s", err)
@@ -185,7 +202,11 @@
a := c.Matches(v) == nil
if a != tc.check {
- t.Errorf("Constraint '%s' failing", tc.constraint)
+ if tc.check {
+ t.Errorf("%q should have matched %q", tc.constraint, tc.version)
+ } else {
+ t.Errorf("%q should not have matched %q", tc.constraint, tc.version)
+ }
}
}
}
@@ -304,10 +325,12 @@
{"<1.1", "0.1.0", true},
{"<1.1", "1.1.0", false},
{"<1.1", "1.1.1", false},
- {"<1.x", "1.1.1", true},
+ {"<1.x", "1.1.1", false},
+ {"<1.x", "0.9.1", true},
{"<1.x", "2.1.1", false},
{"<1.1.x", "1.2.1", false},
- {"<1.1.x", "1.1.500", true},
+ {"<1.1.x", "1.1.500", false},
+ {"<1.1.x", "1.0.500", true},
{"<1.2.x", "1.1.1", true},
{">=1.1", "4.1.0", true},
{">=1.1", "1.1.0", true},
diff --git a/vendor/github.com/Masterminds/semver/parse.go b/vendor/github.com/Masterminds/semver/parse.go
index 6b8d4d9..a6e6a97 100644
--- a/vendor/github.com/Masterminds/semver/parse.go
+++ b/vendor/github.com/Masterminds/semver/parse.go
@@ -67,9 +67,9 @@
}
return v, nil
case ">":
- return expandGreater(v, false), nil
+ return expandGreater(v, wildMinor, wildPatch, false), nil
case ">=", "=>":
- return expandGreater(v, true), nil
+ return expandGreater(v, wildMinor, wildPatch, true), nil
case "<":
return expandLess(v, wildMinor, wildPatch, false), nil
case "<=", "=<":
@@ -158,7 +158,28 @@
return Union(lr, hr)
}
-func expandGreater(v *Version, eq bool) Constraint {
+func expandGreater(v *Version, wildMinor, wildPatch, eq bool) Constraint {
+ if (wildMinor || wildPatch) && !eq {
+ // wildcards negate the meaning of prerelease and other info
+ v = &Version{
+ major: v.major,
+ minor: v.minor,
+ patch: v.patch,
+ }
+
+ // Not equal but with wildcards is the weird case - we have to bump up
+ // the next version AND make it equal
+ if wildMinor {
+ v.major++
+ } else {
+ v.minor++
+ }
+ return rangeConstraint{
+ min: v,
+ includeMin: true,
+ }
+ }
+
return rangeConstraint{
min: v,
includeMin: eq,
@@ -166,19 +187,26 @@
}
func expandLess(v *Version, wildMinor, wildPatch, eq bool) Constraint {
- v2 := &Version{
- major: v.major,
- minor: v.minor,
- patch: v.patch,
- }
- if wildMinor {
- v2.major++
- } else if wildPatch {
- v2.minor++
+ if eq && (wildMinor || wildPatch) {
+ // wildcards negate the meaning of prerelease and other info
+ v = &Version{
+ major: v.major,
+ minor: v.minor,
+ patch: v.patch,
+ }
+ if wildMinor {
+ v.major++
+ } else if wildPatch {
+ v.minor++
+ }
+ return rangeConstraint{
+ max: v,
+ includeMax: false,
+ }
}
return rangeConstraint{
- max: v2,
+ max: v,
includeMax: eq,
}
}