|
|
@ -126,7 +126,7 @@ func getByGopmfile(ctx *cli.Context) { |
|
|
|
for _, p := range imports { |
|
|
|
for _, p := range imports { |
|
|
|
p = doc.GetProjectPath(p) |
|
|
|
p = doc.GetProjectPath(p) |
|
|
|
// Skip subpackage(s) of current project.
|
|
|
|
// Skip subpackage(s) of current project.
|
|
|
|
if strings.HasSuffix(workDir, p) || strings.HasPrefix(p, targetPath) { |
|
|
|
if isSubpackage(p, targetPath) { |
|
|
|
continue |
|
|
|
continue |
|
|
|
} |
|
|
|
} |
|
|
|
node := doc.NewNode(p, p, doc.BRANCH, "", true) |
|
|
|
node := doc.NewNode(p, p, doc.BRANCH, "", true) |
|
|
@ -145,7 +145,6 @@ func getByGopmfile(ctx *cli.Context) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func getByPath(ctx *cli.Context) { |
|
|
|
func getByPath(ctx *cli.Context) { |
|
|
|
return |
|
|
|
|
|
|
|
nodes := make([]*doc.Node, 0, len(ctx.Args())) |
|
|
|
nodes := make([]*doc.Node, 0, len(ctx.Args())) |
|
|
|
for _, info := range ctx.Args() { |
|
|
|
for _, info := range ctx.Args() { |
|
|
|
pkgPath := info |
|
|
|
pkgPath := info |
|
|
@ -214,6 +213,10 @@ func downloadPackages(ctx *cli.Context, nodes []*doc.Node) { |
|
|
|
n.RootPath = doc.GetProjectPath(n.ImportPath) |
|
|
|
n.RootPath = doc.GetProjectPath(n.ImportPath) |
|
|
|
installPath := path.Join(installRepoPath, n.RootPath) + versionSuffix(n.Value) |
|
|
|
installPath := path.Join(installRepoPath, n.RootPath) + versionSuffix(n.Value) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if isSubpackage(n.RootPath, ".") { |
|
|
|
|
|
|
|
continue |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Indicates whether need to download package again.
|
|
|
|
// Indicates whether need to download package again.
|
|
|
|
if n.IsFixed() && com.IsExist(installPath) { |
|
|
|
if n.IsFixed() && com.IsExist(installPath) { |
|
|
|
n.IsGetDepsOnly = true |
|
|
|
n.IsGetDepsOnly = true |
|
|
@ -388,6 +391,8 @@ func updateByVcs(vcs, dirPath string) error { |
|
|
|
if len(stderr) > 0 { |
|
|
|
if len(stderr) > 0 { |
|
|
|
log.Error("", "Error: "+stderr) |
|
|
|
log.Error("", "Error: "+stderr) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
case "svn": |
|
|
|
|
|
|
|
log.Error("", "Error: not support svn yet") |
|
|
|
} |
|
|
|
} |
|
|
|
return nil |
|
|
|
return nil |
|
|
|
} |
|
|
|
} |
|
|
|