Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit 42d3398

Browse files
authoredJan 16, 2018
Merge pull request #1515 from darkowlzz/status-latest-version-type
status: LATEST should be of the same type as VERSION
2 parents d257a63 + 8239ba1 commit 42d3398

File tree

6 files changed

+17
-11
lines changed

6 files changed

+17
-11
lines changed
 

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ IMPROVEMENTS:
2929
* Handle errors when writing status output ([#1420](https://github.com/golang/dep/pull/1420))
3030
* Add constraint for locked projects in `status`. (#962)
3131
* Make external config importers error tolerant. ([#1315](https://github.com/golang/dep/pull/1315))
32+
* Show LATEST and VERSION as the same type in status. (#1515)
3233

3334
# v0.3.2
3435

‎cmd/dep/status.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,12 @@ func runStatusAll(ctx *dep.Ctx, out outputter, p *dep.Project, sm gps.SourceMana
570570
// upgrade, the first version we encounter that
571571
// matches our constraint will be what we want.
572572
if c.Constraint.Matches(v) {
573-
bs.Latest = v.Revision()
573+
// Latest should be of the same type as the Version.
574+
if bs.Version.Type() == gps.IsSemver {
575+
bs.Latest = v
576+
} else {
577+
bs.Latest = v.Revision()
578+
}
574579
break
575580
}
576581
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[{"ProjectRoot":"github.com/sdboyer/deptest","Constraint":"^0.8.0","Version":"v0.8.0","Revision":"ff2948a2ac8f538c4ecd55962e919d1e13e74baf","Latest":"3f4c3bea144e112a69bbe5d8d01c1b09a544253f","PackageCount":1},{"ProjectRoot":"github.com/sdboyer/deptestdos","Constraint":"v2.0.0","Version":"v2.0.0","Revision":"5c607206be5decd28e6263ffffdcee067266015e","Latest":"5c607206be5decd28e6263ffffdcee067266015e","PackageCount":1}]
1+
[{"ProjectRoot":"github.com/sdboyer/deptest","Constraint":"^0.8.0","Version":"v0.8.0","Revision":"ff2948a2ac8f538c4ecd55962e919d1e13e74baf","Latest":"v0.8.1","PackageCount":1},{"ProjectRoot":"github.com/sdboyer/deptestdos","Constraint":"v2.0.0","Version":"v2.0.0","Revision":"5c607206be5decd28e6263ffffdcee067266015e","Latest":"v2.0.0","PackageCount":1}]
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
PROJECT CONSTRAINT VERSION REVISION LATEST PKGS USED
2-
github.com/sdboyer/deptest ^0.8.0 v0.8.0 ff2948a 3f4c3be 1
3-
github.com/sdboyer/deptestdos v2.0.0 v2.0.0 5c60720 5c60720 1
1+
PROJECT CONSTRAINT VERSION REVISION LATEST PKGS USED
2+
github.com/sdboyer/deptest ^0.8.0 v0.8.0 ff2948a v0.8.1 1
3+
github.com/sdboyer/deptestdos v2.0.0 v2.0.0 5c60720 v2.0.0 1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
PROJECT CONSTRAINT VERSION REVISION LATEST PKGS USED
2-
github.com/sdboyer/deptest v0.8.1 (override) v0.8.1 3f4c3be 3f4c3be 1
3-
github.com/sdboyer/deptestdos v2.0.0 v2.0.0 5c60720 5c60720 1
1+
PROJECT CONSTRAINT VERSION REVISION LATEST PKGS USED
2+
github.com/sdboyer/deptest v0.8.1 (override) v0.8.1 3f4c3be v0.8.1 1
3+
github.com/sdboyer/deptestdos v2.0.0 v2.0.0 5c60720 v2.0.0 1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
PROJECT CONSTRAINT VERSION REVISION LATEST PKGS USED
2-
github.com/sdboyer/deptest v1.0.0 v1.0.0 ff2948a ff2948a 1
3-
github.com/sdboyer/deptestdos a0196ba a0196ba 1
1+
PROJECT CONSTRAINT VERSION REVISION LATEST PKGS USED
2+
github.com/sdboyer/deptest v1.0.0 v1.0.0 ff2948a v1.0.0 1
3+
github.com/sdboyer/deptestdos a0196ba a0196ba 1

0 commit comments

Comments
 (0)
This repository has been archived.