Put commit hash and branch name if dependency's version is empty when parsing dep project.
This commit is contained in:
1 file changed
+5
@@ -88,6 +88,11 @@ func (gp *golangParser) getDependenciesFromDep(pkgPath string) []*structs.Depend
|
||||
dependency.VCS.Branch = "master"
|
||||
}
|
||||
|
||||
// If version is empty - write branch name here with commit hash.
|
||||
if dependency.Version == "" {
|
||||
dependency.Version = dependency.VCS.Revision + "@" + dependency.VCS.Branch
|
||||
}
|
||||
|
||||
// All dep-controlled dependencies are vendored. We should get
|
||||
// it's path.
|
||||
dependency.LocalPath = filepath.Join(pkgPath, "vendor", dep.Name)
|
||||
|
||||
Reference in new issue
Block a user