Skip to content

Commit

Permalink
cmd/Go-Package-Store, updater: remove support for vendor.json file
Browse files Browse the repository at this point in the history
The govendor tool has been deprecated in favor of Go module mode,
see kardianos/govendor@e31350d.

Remove all support for its vendor.json file format.

Updates #92.
  • Loading branch information
dmitshur committed Mar 7, 2020
1 parent 082b1a2 commit a90593d
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 83 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ Usage: Go-Package-Store [flags]
Look for Go packages vendored using git-subrepo in the specified vendor directory.
-godeps string
Read the list of Go packages from the specified Godeps.json file.
-govendor string
Read the list of Go packages from the specified vendor.json file.
-http string
Listen for HTTP connections on this address. (default "localhost:7043")
-stdin
Expand All @@ -51,9 +49,6 @@ Examples:
# Show updates for all dependencies within Gopkg.toml constraints.
Go-Package-Store -dep=/path/to/repo/Gopkg.toml
# Show updates for all dependencies listed in vendor.json file.
Go-Package-Store -govendor=/path/to/repo/vendor/vendor.json
# Show updates for all Go packages vendored using git-subrepo
# in the specified vendor directory.
Go-Package-Store -git-subrepo=/path/to/repo/vendor
Expand Down
19 changes: 0 additions & 19 deletions cmd/Go-Package-Store/govendor.go

This file was deleted.

24 changes: 0 additions & 24 deletions cmd/Go-Package-Store/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ var (
stdinFlag = flag.Bool("stdin", false, "Read the list of newline separated Go packages from stdin.")
depFlag = flag.String("dep", "", "Determine the list of Go packages from the specified Gopkg.toml file.")
godepsFlag = flag.String("godeps", "", "Read the list of Go packages from the specified Godeps.json file.")
govendorFlag = flag.String("govendor", "", "Read the list of Go packages from the specified vendor.json file.")
gitSubrepoFlag = flag.String("git-subrepo", "", "Look for Go packages vendored using git-subrepo in the specified vendor directory.")
)

Expand All @@ -56,9 +55,6 @@ Examples:
# Show updates for all dependencies within Gopkg.toml constraints.
Go-Package-Store -dep=/path/to/repo/Gopkg.toml
# Show updates for all dependencies listed in vendor.json file.
Go-Package-Store -govendor=/path/to/repo/vendor/vendor.json
# Show updates for all Go packages vendored using git-subrepo
# in the specified vendor directory.
Go-Package-Store -git-subrepo=/path/to/repo/vendor
Expand Down Expand Up @@ -229,26 +225,6 @@ func populatePipelineAndCreateUpdater(pipeline *workspace.Pipeline) gps.Updater
pipeline.Done()
}()
return nil
case *govendorFlag != "":
fmt.Println("Reading the list of Go packages from vendor.json file:", *govendorFlag)
v, err := readGovendor(*govendorFlag)
if err != nil {
log.Fatalln("failed to read vendor.json file:", err)
}
go func() { // This needs to happen in the background because sending input will be blocked on processing.
for _, dependency := range v.Package {
pipeline.AddRevision(dependency.Path, dependency.Revision)
}
pipeline.Done()
}()
// TODO: Consider setting a better directory for govendor command than current working directory.
// Perhaps the parent directory of vendor.json file?
gu, err := updater.NewGovendor("")
if err != nil {
log.Println("govendor updater is not available:", err)
gu = nil
}
return gu
case *gitSubrepoFlag != "":
if _, err := exec.LookPath("git"); err != nil {
log.Fatalln(fmt.Errorf("git binary is required, but not available: %v", err))
Expand Down
35 changes: 0 additions & 35 deletions updater/govendor.go

This file was deleted.

0 comments on commit a90593d

Please sign in to comment.