github.com/munnerz/test-infra@v0.0.0-20190108210205-ce3d181dc989/docs/dep.md (about) 1 # kubernetes/test-infra dependency management 2 3 test-infra uses [`dep`] for Go dependency 4 management. Usage requires [bazel], which can be accessed 5 through [`planter`] if not locally installed. 6 7 ## Usage 8 9 Run [`hack/update-deps.sh`] whenever vendored dependencies change. This will 10 take around 5m to complete. 11 12 ### Advanced usage 13 14 * [add] - Run `hack/update-deps.sh --add cloud.google.com/go/storage@v0.17.0 [...]` to pin a dependency at a particular version 15 * [update] - Run `hack/update-deps.sh --update golang.org/x/net [...]` to update an existing dependency 16 * [remove] - Edit `Gopkg.toml` and run `hack/update-deps.sh` to remove or unpin dependencies 17 18 ## Tips 19 20 If `dep ensure` doesn't come back and freezes, please make sure `hg` command is 21 installed on your environment. `dep ensure` requires `hg` command for getting 22 bitbucket.org/ww/goautoneg , but `dep ensure` doesn't output such error message 23 and just [freezes]. 24 25 [add]: https://golang.github.io/dep/docs/daily-dep.html#adding-a-new-dependency 26 [bazel]: https://bazel.build/ 27 [`dep`]: https://github.com/golang/dep 28 [freezes]: https://github.com/kubernetes/test-infra/issues/5987 29 [`hack/update-deps.sh`]: /hack/update-deps.sh 30 [`planter`]: /planter 31 [remove]: https://github.com/golang/dep/blob/master/docs/daily-dep.md#rule-changes-in-gopkgtoml 32 [update]: https://golang.github.io/dep/docs/daily-dep.html#updating-dependencies