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

Improvements to dependency management #116

Merged
merged 1 commit into from
Mar 25, 2016

Conversation

tgross
Copy link
Contributor

@tgross tgross commented Mar 25, 2016

This PR tries to make the dependency management story easier to understand while still allowing our upcoming subpackages to be "go gettable" for #83. This also assists me in prepping for #27.

The specific changes are:

  • Eliminated the second makefile for inside the container, which I found hard to debug because of redundant env vars.
  • Add add-dep makefile target that will use go get to fetch the dependency and record it via Godeps save function; this makes it easier to add new dependencies correctly.

The new add-dep target works like this in practice:

DEP=github.com/prometheus/client_golang/prometheus PKG=metrics make add-dep
docker run --rm \
            -v /Users/tim.gross/src/tgross/containerbuddy:/go/cb \
                -v /Users/tim.gross/src/tgross/containerbuddy:/go/cb/src \
                -e GOPATH=/go/cb/src/metrics \
                -w /go/cb/src/metrics \
                containerbuddy_build go get github.com/prometheus/client_golang/prometheus
docker run --rm \
            -v /Users/tim.gross/src/tgross/containerbuddy:/go/cb \
                -v /Users/tim.gross/src/tgross/containerbuddy:/go/cb/src \
                -e GOPATH=/go/cb/src/metrics \
                -w /go/cb/src/metrics \
                containerbuddy_build godep save
mv metrics/src metrics/vendor

cc @justenwalker @misterbisson

@tgross
Copy link
Contributor Author

tgross commented Mar 25, 2016

Oops... I appear to have broken it during cleanup. Lemme fix. I dropped a makefile target. Next run should fix it.

Make the dependency manangement story easier to understand while at the same
time allow the subpackages to be "go gettable".

- Eliminated the second makefile for inside the container, which I found hard to
  debug because of redundant env vars.
- Add `add-dep` makefile target that will use go get to fetch the dependency and
  record it via Godeps `save` function; this makes it easier to add new
  dependencies correctly.
@tgross
Copy link
Contributor Author

tgross commented Mar 25, 2016

Ok, after a couple of dumb mistakes and a rebase to hide the bodies, this should be good-to-go. 😀

@misterbisson
Copy link
Contributor

LGTM.

@justenwalker are you following along with these changes?

🏡 🚶

@tgross tgross merged commit 4664155 into TritonDataCenter:master Mar 25, 2016
@justenwalker
Copy link
Contributor

@misterbisson Yeah, I've been looking a them - haven't had much time to verify them locally but they LGTM

Very nice cleanup efforts @tgross !

@tgross tgross deleted the godeps_again branch April 4, 2017 15:46
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

Successfully merging this pull request may close these issues.

3 participants