diff --git a/Makefile b/Makefile index 55dcd7b333..826bfb5879 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,9 @@ else endif CLI_VERSION := $(if $(shell git describe --tags),$(shell git describe --tags),"UnknownVersion") -BUILD_ARGS := -s -w -X 'github.com/defenseunicorns/zarf/src/config.CLIVersion=$(CLI_VERSION)' +GIT_SHA := $(if $(shell git rev-parse HEAD),$(shell git rev-parse HEAD),"") +BUILD_DATE := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ') +BUILD_ARGS := -s -w -X 'github.com/defenseunicorns/zarf/src/config.CLIVersion=$(CLI_VERSION)' -X 'k8s.io/component-base/version.gitVersion=v0.0.0+zarf$(CLI_VERSION)' -X 'k8s.io/component-base/version.gitCommit=$(GIT_SHA)' -X 'k8s.io/component-base/version.buildDate=$(BUILD_DATE)' .DEFAULT_GOAL := help .PHONY: help