From 585aff0aca7587e9cd6e02d32d365b05f6b5aaf2 Mon Sep 17 00:00:00 2001 From: Yukun Wang Date: Mon, 24 Jun 2024 19:15:39 +0800 Subject: [PATCH] include time and hash in build info (#10474) Signed-off-by: airycanon --- .goreleaser.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 1507aa081421..90aa933d4f69 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -6,7 +6,10 @@ before: builds: - id: kyverno-cli - main: cmd/cli/kubectl-kyverno/main.go + # As mentioned in https://github.com/golang/go/issues/51831, to include build info, we should use go build + # instead of go build main.go here. + # see https://goreleaser.com/customization/builds/ + main: ./cmd/cli/kubectl-kyverno binary: kyverno env: - CGO_ENABLED=0