Skip to content

Commit

Permalink
cmd/coordinator: make version.sh return dirty if no git remotes
Browse files Browse the repository at this point in the history
Fixes #29929

Change-Id: Icf13b3f39588567d1b330682596e06774861aae7
GitHub-Last-Rev: 2a466b1
GitHub-Pull-Request: #17
Reviewed-on: https://go-review.googlesource.com/c/159699
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
saitarunreddy authored and bradfitz committed Jan 28, 2019
1 parent 47e1a61 commit 269e03a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/coordinator/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if ! git diff-index HEAD --quiet || ! git diff-files --quiet; then
VERSION=$VERSION-dirty
dirty=1
fi
if [ -n "$dirty" ] || [ -n "$(git rev-list '@{upstream}..HEAD')" ]; then
if [ -n "$dirty" ] || [ -z "$(git remote -v)"] || [ -n "$(git rev-list '@{upstream}..HEAD')" ]; then
VERSION=$VERSION-$USER-$(date -u +%Y-%m-%dT%H:%M:%SZ)
fi
echo "$VERSION"

0 comments on commit 269e03a

Please sign in to comment.