shurcooL / Go-Package-Store

An app that displays updates for the Go packages in your GOPATH.
MIT License
900 stars 29 forks source link

Add support for visualizing and updating dependencies (within Gopkg.toml constraints) in dep-enabled projects. #82

Closed dmitshur closed 7 years ago

dmitshur commented 7 years ago

This PR adds support for dep and resolves #81. /cc @sdboyer @bits01 @bradleyfalzon

A new -dep flag is added. Using it requires dep binary to be available in PATH. When -dep flag is set to point to a Gopkg.toml file of a dep-enabled project, it runs dep status in the containing directory to determine available updates (within Gopkg.toml constraints) and then displays them in a visual form.

The Update (and Update All) buttons are functional. Pressing them executes dep ensure -update {root} command in same directory, causing the update to be applied.

E.g.:

$ Go-Package-Store -dep=/Users/Gopher/go/src/github.com/bradleyfalzon/gopherci/Gopkg.toml
Determining the list of Go packages from Gopkg.toml file: /Users/Gopher/go/src/github.com/bradleyfalzon/gopherci/Gopkg.toml
Go Package Store server is running at http://localhost:7043/updates.

dep ensure -update github.com/google/go-github
Done.

image

bradleyfalzon commented 7 years ago

This is great, going to give it a test shortly. Did you want to update the README.md with a similar example to the PR's?

dmitshur commented 7 years ago

Did you want to update the README.md with a similar example to the PR's?

Sorry, I don't understand what you mean by that. Can you rephrase?

README.md is already updated to include the new Go-Package-Store -help output, which includes a new usage example. Isn't it so?

bradleyfalzon commented 7 years ago

which includes a new usage example. Isn't it?

Argh, yes, sorry, I must have skipped over that file when I looked, ignore my comment!