mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Fix gitcommit() in hack/config-go.sh
Previously it would only print a version when the tree was dirty. Fix it so that it will also print one on a clean tree. Tested: - Built it from a committed tree: $ hack/build-go.sh $ output/go/bin/kubelet -version Kubernetes version 0.1, build a091590dd10c Signed-off-by: Filipe Brandenburger <filbranden@google.com>
This commit is contained in:
parent
923b2c12c2
commit
7785f14b32
@ -31,6 +31,8 @@ function gitcommit() {
|
||||
# Check if the tree is dirty.
|
||||
if ! dirty_tree=$(git status --porcelain) || [[ -n "${dirty_tree}" ]]; then
|
||||
echo "${git_commit}-dirty"
|
||||
else
|
||||
echo "${git_commit}"
|
||||
fi
|
||||
else
|
||||
echo "(none)"
|
||||
|
Loading…
Reference in New Issue
Block a user