Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ require (
k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f
k8s.io/klog/v2 v2.130.1
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
knative.dev/hack v0.0.0-20260120115810-bf6758cba446
knative.dev/hack v0.0.0-20260420222011-c985ed3cefe8
sigs.k8s.io/randfill v1.0.0
sigs.k8s.io/yaml v1.6.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOP
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts=
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
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=
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
Expand Down
21 changes: 14 additions & 7 deletions vendor/knative.dev/hack/library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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 \
Expand All @@ -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}"

Expand Down Expand Up @@ -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; }
}

Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ k8s.io/utils/lru
k8s.io/utils/net
k8s.io/utils/ptr
k8s.io/utils/trace
# knative.dev/hack v0.0.0-20260120115810-bf6758cba446
# knative.dev/hack v0.0.0-20260420222011-c985ed3cefe8
## explicit; go 1.24
knative.dev/hack
# sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8
Expand Down
Loading