Skip to content

Commit b9ac854

Browse files
authored
Merge pull request #12858 from chrischdi/pr-conformance-pass-down-k8s-version-for-conformance
🌱 scripts: fix kind build git commit setting
2 parents 195a243 + 6222590 commit b9ac854

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/ci-e2e-lib.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,17 @@ k8s::setBuildVersion() {
238238

239239
local major
240240
local minor
241+
local commit
241242
major=$(echo "${version#v}" | awk '{split($0,a,"."); print a[1]}')
242243
minor=$(echo "${version#v}" | awk '{split($0,a,"."); print a[2]}')
244+
commit=$(git rev-parse HEAD)
243245

244246
cat > build-version << EOL
245247
export KUBE_GIT_MAJOR=$major
246248
export KUBE_GIT_MINOR=$minor
247249
export KUBE_GIT_VERSION=$version
248250
export KUBE_GIT_TREE_STATE=clean
249-
export KUBE_GIT_COMMIT=d34db33f
251+
export KUBE_GIT_COMMIT=${commit}
250252
EOL
251253

252254
export KUBE_GIT_VERSION_FILE=$PWD/build-version

0 commit comments

Comments
 (0)