File tree Expand file tree Collapse file tree 4 files changed +15
-21
lines changed
Expand file tree Collapse file tree 4 files changed +15
-21
lines changed Original file line number Diff line number Diff line change 55require (
66 github.com/spf13/cobra v1.3.0
77 gotest.tools/v3 v3.1.0
8- knative.dev/client v0.31.0
9- knative.dev/hack v0.0.0-20220411131823-6ffd8417de7c
8+ knative.dev/client v0.31.1-0.20220421115330-736c7c24ef2a
9+ knative.dev/hack v0.0.0-20220427014036-5f473869d377
1010
1111)
1212
Original file line number Diff line number Diff line change @@ -2162,11 +2162,12 @@ k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
21622162k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc =
21632163k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 /go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA =
21642164knative.dev/caching v0.0.0-20220412163508-8b5c244b8182 /go.mod h1:BFtnxIjI27VMV52u4vHhplij9j5PbQRXFlDMv7EMjbM =
2165- knative.dev/client v0.31.0 h1:TB5NELQ6f2PSp5h8IOdzrqMk9dV91ip/9YXqxNHoNWs =
2166- knative.dev/client v0.31.0 /go.mod h1:393rr9RYzIuy7LVyvfoCucSeg/XsXfLq64taSRnukmE =
2165+ knative.dev/client v0.31.1-0.20220421115330-736c7c24ef2a h1:IdrRAUsJBIANosO9cY7kCVtZSNIL8tClUPkW5ATlhZA =
2166+ knative.dev/client v0.31.1-0.20220421115330-736c7c24ef2a /go.mod h1:393rr9RYzIuy7LVyvfoCucSeg/XsXfLq64taSRnukmE =
21672167knative.dev/eventing v0.31.0 /go.mod h1:XgJY27IxyBjmu/mz53cVlz+oMPPzzRaVXlPmWKCqEd8 =
2168- knative.dev/hack v0.0.0-20220411131823-6ffd8417de7c h1:aXsFXeky/GccNQxwf72CS4NR3EoqTqsCVNKQnblfwr0 =
21692168knative.dev/hack v0.0.0-20220411131823-6ffd8417de7c /go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI =
2169+ knative.dev/hack v0.0.0-20220427014036-5f473869d377 h1:NMJG3LkOZ5Xut7TzbxtwaQAmT8ZBfDMxwCkoatZv8ms =
2170+ knative.dev/hack v0.0.0-20220427014036-5f473869d377 /go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI =
21702171knative.dev/hack/schema v0.0.0-20220411131823-6ffd8417de7c /go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0 =
21712172knative.dev/networking v0.0.0-20220412163509-1145ec58c8be /go.mod h1:6OZIUimxPelIIudzHWRd+Lc7ippC5t+DC8CsZKCOjcI =
21722173knative.dev/pkg v0.0.0-20220412134708-e325df66cb51 h1:4AmaxeY7+r/PYYz3HS9pMY21Mw3ykO6STLFEk2FoJ2s =
Original file line number Diff line number Diff line change @@ -544,26 +544,19 @@ function start_latest_eventing_sugar_controller() {
544544}
545545
546546# Run a go tool, installing it first if necessary.
547- # Parameters: $1 - tool package/dir for go get/ install.
547+ # Parameters: $1 - tool package/dir for go install.
548548# $2 - tool to run.
549549# $3..$n - parameters passed to the tool.
550550function run_go_tool() {
551+ local package=$1
551552 local tool=$2
552553 local install_failed=0
554+ # If no `@version` is provided, default to adding `@latest`
555+ if [[ " $package " != * @* ]]; then
556+ package=$package @latest
557+ fi
553558 if [[ -z " $( which ${tool} ) " ]]; then
554- local action=get
555- [[ $1 =~ ^[\. /].* ]] && action=install
556- # Avoid running `go get` from root dir of the repository, as it can change go.sum and go.mod files.
557- # See discussions in https://github.com/golang/go/issues/27643.
558- if [[ ${action} == " get" && $( pwd) == " ${REPO_ROOT_DIR} " ]]; then
559- local temp_dir=" $( mktemp -d) "
560- # Swallow the output as we are returning the stdout in the end.
561- pushd " ${temp_dir} " > /dev/null 2>&1
562- GOFLAGS=" " go ${action} " $1 " || install_failed=1
563- popd > /dev/null 2>&1
564- else
565- GOFLAGS=" " go ${action} " $1 " || install_failed=1
566- fi
559+ GOFLAGS=" " go install " $package " || install_failed=1
567560 fi
568561 (( install_failed )) && return ${install_failed}
569562 shift 2
Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ gotest.tools/v3/internal/assert
2828gotest.tools/v3/internal/difflib
2929gotest.tools/v3/internal/format
3030gotest.tools/v3/internal/source
31- # knative.dev/client v0.31.0
31+ # knative.dev/client v0.31.1-0.20220421115330-736c7c24ef2a
3232## explicit; go 1.17
3333knative.dev/client/pkg/kn/plugin
34- # knative.dev/hack v0.0.0-20220411131823-6ffd8417de7c
34+ # knative.dev/hack v0.0.0-20220427014036-5f473869d377
3535## explicit; go 1.14
3636knative.dev/hack
You can’t perform that action at this time.
0 commit comments