Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to install binaries? #3

Closed
joeshaw opened this issue Aug 6, 2014 · 2 comments
Closed

Any way to install binaries? #3

joeshaw opened this issue Aug 6, 2014 · 2 comments

Comments

@joeshaw
Copy link

joeshaw commented Aug 6, 2014

I would like a Go dependency management tool to be able to handle installing specific versions of binaries. Is there a way to do this with glock?

For instance, I'd like to be able to lock a specific revision of github.com/jteeuwen/go-bindata/go-bindata. It is installed into $GOPATH/bin, and I can't import it directly into my code.

I've tried creating a deps.go file with // +build ignore at the top, but glock seems to ignore the file in that case. If I remove the build ignore flag it gets github.com/jteeuwen/go-bindata, but not the go-bindata binary. (Then my program also fails to build because I am trying to import something that isn't a package.)

If it's not possible, would you consider adding something like this to glock?

@robfig
Copy link
Owner

robfig commented Sep 6, 2014

This sounds like a great feature.

One possible implementation:

"glock bin path/to/project/cmd/prog" could add "bin path/to/project/cmd/prog" to the bottom of the GLOCKFILE and then recompute dependencies. When computing dependencies, glock would consider the "bin" lines as imports.

The only thing that's a little bit dirty about the above is that the GLOCKFILE will contain computed data as well as user-provided configuration. Presently it is purely computed from the GOPATH. It's probably ok.. doesn't seem worth adding a 2nd file to avoid it.

@robfig
Copy link
Owner

robfig commented Sep 11, 2014

Please give it a shot and let me know how it works for you
a593771

@robfig robfig closed this as completed Sep 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants