From 2107aecfe6ac7d7ec911108c5665d4dd27aa5d89 Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Sun, 31 May 2026 00:10:01 +0000 Subject: [PATCH] upgrade to latest dependencies bumping knative.dev/hack bf6758c...c985ed3: > c985ed3 [release-1.21] Add env var to pass extra flag to license check (# 471) > e37ec67 Bump go-licenses to v2.0.1 release (# 468) Signed-off-by: Knative Automation --- go.mod | 2 +- go.sum | 4 ++-- vendor/knative.dev/hack/library.sh | 21 ++++++++++++++------- vendor/modules.txt | 2 +- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index 7584f9f29f1..207734b9e4c 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.24.0 require ( github.com/google/go-github/v32 v32.1.0 gopkg.in/yaml.v2 v2.3.0 - knative.dev/hack v0.0.0-20260120115810-bf6758cba446 + knative.dev/hack v0.0.0-20260420222011-c985ed3cefe8 ) require ( diff --git a/go.sum b/go.sum index d7cf05e0dd4..114cafdf542 100644 --- a/go.sum +++ b/go.sum @@ -23,5 +23,5 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -knative.dev/hack v0.0.0-20260120115810-bf6758cba446 h1:Y8raYHIuAL9/gUKGYD9/dD+EqUTmrpqVDowzfUVSlGs= -knative.dev/hack v0.0.0-20260120115810-bf6758cba446/go.mod h1:L5RzHgbvam0u8QFHfzCX6MKxu/a/gIGEdaRBqNiVbl0= +knative.dev/hack v0.0.0-20260420222011-c985ed3cefe8 h1:IrUBuFRxzqUm+f//hY6XGPzXozcoXD/dSsqcid84/Eg= +knative.dev/hack v0.0.0-20260420222011-c985ed3cefe8/go.mod h1:L5RzHgbvam0u8QFHfzCX6MKxu/a/gIGEdaRBqNiVbl0= diff --git a/vendor/knative.dev/hack/library.sh b/vendor/knative.dev/hack/library.sh index 447484b6de3..c0a536f8a78 100644 --- a/vendor/knative.dev/hack/library.sh +++ b/vendor/knative.dev/hack/library.sh @@ -35,6 +35,13 @@ if [[ ! -v GOPATH ]]; then fi fi +# Pinned tool versions +readonly GUM_VERSION="v0.14.1" +readonly GOTESTSUM_VERSION="v1.13.0" +readonly GOTESTFMT_VERSION="v2.5.0" +readonly TERMINAL_TO_HTML_VERSION="v3.10.0" +readonly GO_LICENSES_VERSION="v2.0.1" + # Useful environment variables [[ -v PROW_JOB_ID ]] && IS_PROW=1 || IS_PROW=0 readonly IS_PROW @@ -265,7 +272,7 @@ function gum_banner() { # Simple info banner for logging purposes. function gum_style() { - go_run github.com/charmbracelet/gum@v0.14.1 style "$@" + go_run "github.com/charmbracelet/gum@${GUM_VERSION}" style "$@" } # Checks whether the given function exists. @@ -588,7 +595,7 @@ function report_go_test() { logfile="${logfile/.xml/.jsonl}" echo "Running go test with args: ${go_test_args[*]}" local gotest_retcode=0 - go_run gotest.tools/gotestsum@v1.13.0 \ + go_run "gotest.tools/gotestsum@${GOTESTSUM_VERSION}" \ --format "${GO_TEST_VERBOSITY:-testname}" \ --junitfile "${xml}" \ --junitfile-testsuite-name relative \ @@ -601,14 +608,14 @@ function report_go_test() { echo "Test log (JSONL) written to ${logfile}" ansilog="${logfile/.jsonl/-ansi.log}" - go_run github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@v2.5.0 \ + go_run "github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@${GOTESTFMT_VERSION}" \ -input "${logfile}" \ -showteststatus \ -nofail > "$ansilog" echo "Test log (ANSI) written to ${ansilog}" htmllog="${logfile/.jsonl/.html}" - go_run github.com/buildkite/terminal-to-html/v3/cmd/terminal-to-html@v3.10.0 \ + go_run "github.com/buildkite/terminal-to-html/v3/cmd/terminal-to-html@${TERMINAL_TO_HTML_VERSION}" \ --preview < "$ansilog" > "$htmllog" echo "Test log (HTML) written to ${htmllog}" @@ -921,10 +928,10 @@ function run_kntest() { } # Run go-licenses to check for forbidden licenses. +# Extra flags can be passed via the GO_LICENSES_FLAGS environment variable. function check_licenses() { - # Check that we don't have any forbidden licenses. - go_run github.com/google/go-licenses@v1.6.0 \ - check "${REPO_ROOT_DIR}/..." || \ + go_run "github.com/google/go-licenses/v2@${GO_LICENSES_VERSION}" \ + check ${GO_LICENSES_FLAGS:-} "${REPO_ROOT_DIR}/..." || \ { echo "--- FAIL: go-licenses failed the license check"; return 1; } } diff --git a/vendor/modules.txt b/vendor/modules.txt index 75b55cbb832..a78e775c68f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -22,7 +22,7 @@ golang.org/x/crypto/openpgp/s2k # gopkg.in/yaml.v2 v2.3.0 ## explicit gopkg.in/yaml.v2 -# knative.dev/hack v0.0.0-20260120115810-bf6758cba446 +# knative.dev/hack v0.0.0-20260420222011-c985ed3cefe8 ## explicit; go 1.24 knative.dev/hack # go.opencensus.io => go.opencensus.io v0.20.2