mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
build: remove workaround for ./... vendor matching
This workaround was necessary for Go 1.8. The Go 1.9 release changed the expansion rules to exclude vendored packages.
This commit is contained in:
parent
b6e673152a
commit
de9ba1b4a1
2 changed files with 0 additions and 28 deletions
|
|
@ -214,7 +214,6 @@ func doInstall(cmdline []string) {
|
|||
if flag.NArg() > 0 {
|
||||
packages = flag.Args()
|
||||
}
|
||||
packages = build.ExpandPackagesNoVendor(packages)
|
||||
|
||||
if *arch == "" || *arch == runtime.GOARCH {
|
||||
goinstall := goTool("install", buildFlags(env)...)
|
||||
|
|
@ -311,7 +310,6 @@ func doTest(cmdline []string) {
|
|||
if len(flag.CommandLine.Args()) > 0 {
|
||||
packages = flag.CommandLine.Args()
|
||||
}
|
||||
packages = build.ExpandPackagesNoVendor(packages)
|
||||
|
||||
// Run the actual tests.
|
||||
// Test a single package at a time. CI builders are slow
|
||||
|
|
|
|||
|
|
@ -153,32 +153,6 @@ func GoTool(tool string, args ...string) *exec.Cmd {
|
|||
return exec.Command(filepath.Join(runtime.GOROOT(), "bin", "go"), args...)
|
||||
}
|
||||
|
||||
// ExpandPackagesNoVendor expands a cmd/go import path pattern, skipping
|
||||
// vendored packages.
|
||||
func ExpandPackagesNoVendor(patterns []string) []string {
|
||||
expand := false
|
||||
for _, pkg := range patterns {
|
||||
if strings.Contains(pkg, "...") {
|
||||
expand = true
|
||||
}
|
||||
}
|
||||
if expand {
|
||||
cmd := GoTool("list", patterns...)
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Fatalf("package listing failed: %v\n%s", err, string(out))
|
||||
}
|
||||
var packages []string
|
||||
for _, line := range strings.Split(string(out), "\n") {
|
||||
if !strings.Contains(line, "/vendor/") {
|
||||
packages = append(packages, strings.TrimSpace(line))
|
||||
}
|
||||
}
|
||||
return packages
|
||||
}
|
||||
return patterns
|
||||
}
|
||||
|
||||
// UploadSFTP uploads files to a remote host using the sftp command line tool.
|
||||
// The destination host may be specified either as [user@]host[: or as a URI in
|
||||
// the form sftp://[user@]host[:port].
|
||||
|
|
|
|||
Loading…
Reference in a new issue