We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 02cac04 + d5d9c3c commit 4e3a778Copy full SHA for 4e3a778
hack/helm.sh
@@ -23,4 +23,7 @@ set -o nounset
23
set -o errtrace
24
25
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)"
26
-go run -modfile "${ROOT}/tools/go.mod" helm.sh/helm/v3/cmd/helm "$@"
+K8_VERSION_MAJOR=$(kubectl version -o json |jq -r .serverVersion.major)
27
+K8_VERSION_MINOR=$(kubectl version -o json |jq -r .serverVersion.minor)
28
+LDFLAGS="-X helm.sh/helm/v3/pkg/chartutil.k8sVersionMajor=${K8_VERSION_MAJOR} -X helm.sh/helm/v3/pkg/chartutil.k8sVersionMinor=${K8_VERSION_MINOR}"
29
+go run -modfile "${ROOT}/tools/go.mod" -ldflags "${LDFLAGS}" helm.sh/helm/v3/cmd/helm --debug "$@"
0 commit comments