From 7785f14b32d6e737b622435a3ce0b8cf0b0e88ef Mon Sep 17 00:00:00 2001 From: Filipe Brandenburger Date: Wed, 27 Aug 2014 09:14:51 -0700 Subject: [PATCH] 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 --- hack/config-go.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hack/config-go.sh b/hack/config-go.sh index 15f52332433..f445e292752 100644 --- a/hack/config-go.sh +++ b/hack/config-go.sh @@ -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)"