Commit Graph

16 Commits

Author SHA1 Message Date
Maciek Pytel eed2fc11db Minor bugfix to update-vendor script
Previously we would run `go mod vendor` before `go mod tidy`, meaning
that we were snapshotting dependencies before we were really finished
updating them.
2022-04-07 18:35:34 +02:00
Daniel Kłobuszewski b95a611216 Update Cluster Autoscaler version with vendor
Since Cluster Autoscaler versioning should be in sync with Kubernetes,
update-vendor.sh can simply set the version after a successful
dependency update.
2021-08-06 17:30:09 +02:00
Brett Elliott e1b7f629ef Print out error when unable to download module
Use shell syntax instead of pipe so error messages are printed out. Before
this change, if it could not download a module, it would just exit without
printing an error message due to the pipe. With this change it now prints
out the error message(unable to download) from the underlying process.
2021-05-21 17:39:35 +02:00
Bartłomiej Wróblewski 23b4329759 Enable custom k8s fork in update-vendor.sh 2021-05-11 15:51:57 +00:00
Ben Moss aeb50efa5d Add hack/submodule-k8s script 2021-03-02 13:27:20 +01:00
Ben Moss dc7cd34ef5 Add hack/submodule-k8s script 2021-03-02 13:23:59 +01:00
Ben Moss f8fbdd1be0 Simplify hack/update-vendor.sh
Based on https://github.com/kubernetes/kubernetes/issues/79384#issuecomment-521493597
2021-02-23 12:46:22 +01:00
Mario Valderrama 8a000b0577 Fixes for update-vendor.sh on OSX and zsh
The update-vendor.sh script needed some fixes to work with zsh on OSX.

Various binaries are expected to be GNU utils, which are not installed
by default on OSX. I've added suggestions to install ported binaries
using homebrew if they are not found in PATH.

Skip `shopt -s lastpipe` when `$BASH` is not defined.
2020-11-17 14:57:30 +01:00
Thomas George Hartland 92229a112e Use shallow clone in update-vendor.sh 2020-08-10 12:55:37 +02:00
Maciek Pytel b56af8a39b Allow overriding go version when updating vendor
This is required because Kubernetes 1.17 lists go1.12 in go.mod,
but it doesn't actually compile using go1.12.
2020-07-24 15:19:16 +02:00
Aleksandra Malinowska 7fb3ea1d09 Make k8s fork configurable in update vendor 2020-02-13 15:28:19 +01:00
Łukasz Osipiuk 451015620e Tweaks to update-vendor.sh 2020-01-28 15:28:21 +01:00
Jay Pipes 237863a0fc Use git reset instead of git restore
The `git restore` command was introduced in Git version 2.23.0, which
was released in August 2019. Even late Linux distributions do not
include this modern of a Git binary. For example, Ubuntu 19.10 as of Nov
26, 2019 only includes Git 2.20.1.

In order to run hack/update-vendor.sh on machines with Git <2.23.0, I've
modified the script to use `git reset .` instead of `git restore
--staged`.

Issue #2560
2019-11-26 08:25:14 -05:00
Andrew McDermott a476691b19 cluster-autoscaler/hack/update-vendor.sh: fix usage of git commit
Running this script as-is fails as `git ci` is not a recognised
command. Fixed by referencing `git commit` explicitly; I guess it
works as it may be aliased.
2019-09-09 12:52:41 +01:00
Łukasz Osipiuk 97b205c040 Fixes/Improvements to update-vendor.sh 2019-06-26 11:45:00 +02:00
Łukasz Osipiuk 84af939100 Add update-vendor.sh
A script for automatic vendor directory update in world when
k8s.io/kubernets uses go modules.
2019-06-10 14:28:12 +02:00