Convert go_binary linkstamp to x_defs
This commit is contained in:
@@ -118,12 +118,15 @@ kube::version::ldflag() {
|
||||
local key=${1}
|
||||
local val=${2}
|
||||
|
||||
# If you update these, also update the list pkg/version/def.bzl.
|
||||
echo "-X ${KUBE_GO_PACKAGE}/pkg/version.${key}=${val}"
|
||||
echo "-X ${KUBE_GO_PACKAGE}/vendor/k8s.io/client-go/pkg/version.${key}=${val}"
|
||||
}
|
||||
|
||||
# Prints the value that needs to be passed to the -ldflags parameter of go build
|
||||
# in order to set the Kubernetes based on the git tree status.
|
||||
# IMPORTANT: if you update any of these, also update the lists in
|
||||
# pkg/version/def.bzl and hack/print-workspace-status.sh.
|
||||
kube::version::ldflags() {
|
||||
kube::version::get_version_vars
|
||||
|
||||
|
@@ -29,6 +29,8 @@ kube::version::get_version_vars
|
||||
# instead of volatile-status.txt.
|
||||
# Stamped rules will be retriggered by changes to stable-status.txt, but not by
|
||||
# changes to volatile-status.txt.
|
||||
# IMPORTANT: the camelCase vars should match the lists in hack/lib/version.sh
|
||||
# and pkg/version/def.bzl.
|
||||
cat <<EOF
|
||||
STABLE_BUILD_GIT_COMMIT ${KUBE_GIT_COMMIT-}
|
||||
STABLE_BUILD_SCM_STATUS ${KUBE_GIT_TREE_STATE-}
|
||||
|
Reference in New Issue
Block a user