Skip to content

Commit

Permalink
vendor: check vendor directory (go-delve#1962)
Browse files Browse the repository at this point in the history
Remove gitignore rule preventing vendor/modules.txt file from being
commited, add check that the vendor directory is synchronized.
  • Loading branch information
aarzilli committed Mar 26, 2020
1 parent 4abf4f1 commit 2786e46
Show file tree
Hide file tree
Showing 5 changed files with 357 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
@@ -1,4 +1,3 @@
**/*.txt
**/*.test
.tags*
tags
Expand Down
5 changes: 4 additions & 1 deletion scripts/make.go
Expand Up @@ -193,9 +193,11 @@ func getoutput(cmd string, args ...interface{}) string {
x.Env = os.Environ()
out, err := x.Output()
if err != nil {
fmt.Fprintf(os.Stderr, "Error executing %s %v\n", cmd, args)
log.Fatal(err)
}
if !x.ProcessState.Success() {
fmt.Fprintf(os.Stderr, "Error executing %s %v\n", cmd, args)
os.Exit(1)
}
return string(out)
Expand Down Expand Up @@ -416,7 +418,7 @@ func inpath(exe string) bool {

func allPackages() []string {
r := []string{}
for _, dir := range strings.Split(getoutput("go", "list", "./..."), "\n") {
for _, dir := range strings.Split(getoutput("go", "list", "-mod=vendor", "./..."), "\n") {
dir = strings.TrimSpace(dir)
if dir == "" || strings.Contains(dir, "/vendor/") || strings.Contains(dir, "/scripts") {
continue
Expand All @@ -428,5 +430,6 @@ func allPackages() []string {
}

func main() {
allPackages() // checks that vendor directory is synced as a side effect
NewMakeCommands().Execute()
}
174 changes: 174 additions & 0 deletions vendor/github.com/spf13/cobra/LICENSE.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

132 changes: 132 additions & 0 deletions vendor/go.starlark.net/syntax/grammar.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions vendor/modules.txt
@@ -0,0 +1,47 @@
# github.com/cosiner/argv v0.0.0-20170225145430-13bacc38a0a5
github.com/cosiner/argv
# github.com/google/go-dap v0.2.0
github.com/google/go-dap
# github.com/hashicorp/golang-lru v0.5.4
github.com/hashicorp/golang-lru/simplelru
# github.com/inconshreveable/mousetrap v1.0.0
github.com/inconshreveable/mousetrap
# github.com/mattn/go-colorable v0.0.0-20170327083344-ded68f7a9561
github.com/mattn/go-colorable
# github.com/mattn/go-isatty v0.0.3
github.com/mattn/go-isatty
# github.com/peterh/liner v0.0.0-20170317030525-88609521dc4b
github.com/peterh/liner
# github.com/pkg/profile v0.0.0-20170413231811-06b906832ed0
github.com/pkg/profile
# github.com/sirupsen/logrus v0.0.0-20180523074243-ea8897e79973
github.com/sirupsen/logrus
# github.com/spf13/cobra v0.0.0-20170417170307-b6cb39589372
github.com/spf13/cobra
# github.com/spf13/pflag v0.0.0-20170417173400-9e4c21054fa1
github.com/spf13/pflag
# go.starlark.net v0.0.0-20190702223751-32f345186213
go.starlark.net/internal/compile
go.starlark.net/internal/spell
go.starlark.net/resolve
go.starlark.net/starlark
go.starlark.net/syntax
# golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4
golang.org/x/arch/arm64/arm64asm
golang.org/x/arch/x86/x86asm
# golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
golang.org/x/crypto/ssh/terminal
# golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb
golang.org/x/sys/unix
golang.org/x/sys/windows
# golang.org/x/tools v0.0.0-20191127201027-ecd32218bd7f
golang.org/x/tools/go/gcexportdata
golang.org/x/tools/go/internal/gcimporter
golang.org/x/tools/go/internal/packagesdriver
golang.org/x/tools/go/packages
golang.org/x/tools/internal/fastwalk
golang.org/x/tools/internal/gopathwalk
golang.org/x/tools/internal/semver
golang.org/x/tools/internal/span
# gopkg.in/yaml.v2 v2.2.1
gopkg.in/yaml.v2

0 comments on commit 2786e46

Please sign in to comment.