This commit is contained in:
Jordan Krage 2017-07-18 21:33:50 -05:00
Родитель 51fbd64516
Коммит 21d9f73114
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -224,7 +224,7 @@ func (g *gopathScanner) scanGopathForDependencies() (projectData, error) {
notondisk[pr] = true
continue
}
v, err := gps.VSCVersion(abs)
v, err := gps.VCSVersion(abs)
if err != nil {
notondisk[pr] = true
continue
@ -294,7 +294,7 @@ func (g *gopathScanner) scanGopathForDependencies() (projectData, error) {
notondisk[pr] = true
return nil
}
v, err := gps.VSCVersion(abs)
v, err := gps.VCSVersion(abs)
if err != nil {
// Even if we know it's on disk, errors are still
// possible when trying to deduce version. If we

Просмотреть файл

@ -11,8 +11,8 @@ import (
"github.com/pkg/errors"
)
// VSCVersion returns the current project version for an absolute path.
func VSCVersion(path string) (Version, error) {
// VCSVersion returns the current project version for an absolute path.
func VCSVersion(path string) (Version, error) {
repo, err := vcs.NewRepo("", path)
if err != nil {
return nil, errors.Wrapf(err, "creating new repo for root: %s", path)

Просмотреть файл

@ -30,7 +30,7 @@ func TestVCSVersion(t *testing.T) {
rev: NewVersion("v0.8.0").Pair("645ef00459ed84a119197bfb8d8205042c6df63d"), // semver
checkout: true,
},
"github.com/Sirupsen/logrus": {
"github.com/sirupsen/logrus": {
rev: Revision("42b84f9ec624953ecbf81a94feccb3f5935c5edf"), // random sha
checkout: true,
},
@ -47,7 +47,7 @@ func TestVCSVersion(t *testing.T) {
h.RunGit(repoDir, "checkout", info.rev.String())
}
abs := filepath.FromSlash(filepath.Join(gopath, "src", ip))
got, err := VSCVersion(abs)
got, err := VCSVersion(abs)
h.Must(err)
if got != info.rev {