This sets `$what_VERSION` and `$what_REPO` for runc, cni, containerd and kubernetes based on vendor.conf, removing the need to duplicate things in hack/versions. With this `update_hack_versions` becomes redundant so remove it and both calls. Since CONTAINERD_REPO is now unconditionally set we can also simplify the fetching of vendor.conf in update-vendor.sh a bit, so do so. Further since `*_REPO` are now unconditionally set we can support alternative clone paths for all of these repos by adjusting checkout_repo to make the 3rd argument non-optional and always passing it. Since `CRITOOL_VERSION` is not coming from `vendor.conf` (since it is not used from Go code) we manually set `CRITOOL_REPO` for consistency. The final wrinkle is that `k8s.io/kubernetes` is has a Go specific redirect in the form of HTML meta headers returned from https://k8s.io/kubernetes/?go-get=1 which point to the real repo to clone. Parsing that in shell is tricky so just hardcode that. Fixes #540. Signed-off-by: Ian Campbell <ijc@docker.com>
2.8 KiB
Executable File
2.8 KiB
Executable File