mirror of https://github.com/k3s-io/k3s
Merge pull request #57222 from xialonglee/keep-ldfalgs-spaces-safe
Automatic merge from submit-queue (batch tested with PRs 55475, 57155, 57260, 57222). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. make sure that 'ldflags' are space-safe **What this PR does / why we need it**: Recently I met the problem as #56216 described, I download the source-tar of 1.8.5 and run `make` command failed because of invalid ldflag: `-X k8s.io/kubernetes/pkg/version.gitTreeState=git archive` Though #56249 has change version string `git archive` to `archive`, i think we should avoid this problem happen again. cc @ixdy **Release note**: NONEpull/6/head
commit
cdbfff0773
|
@ -133,8 +133,8 @@ kube::version::ldflag() {
|
|||
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}"
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue