Vendoring all dependencies is essential to have a go get-able package.
Tools needed:
make deps
will instal them, in case they are missing
If you write new features which imports a new library, you have to vendor it:
glide get -v github.com/Masterminds/cookoo/web
glide-vc --only-code --no-tests
Sometimes you have an unmerged PR, or a change which you don't even want to push upstream. In those cases you have a GH fork, and want use that instead of the origin.
glide.yaml:
- package: k8s.io/helm
repo: https://github.com/banzaicloud/helm.git
vcs: git
If you are using a specific branch/tag like v1.2.0 in glide.yaml, just change it to the new version.
Otherwise if you haven't picked a branch/tag and just used the latest master, you will have a commit sha in glide.lock. Due to a bug in glide it will be stuck on that sha. To fix it, you have to specify master (or a branch/tag) in glide.yaml:
- package: github.com/prometheus/prometheus
version: ^2.0.0
than perform an update:
glide up -v
glide-vc --only-code --no-tests
This project was previously using dep. But dep ensure
couldn't handle k8s.io dependencies.
see GH issues: