зеркало из https://github.com/golang/build.git
build/cmd/coordinator/version.sh: added check incase of no upstream set
Added " [-n $(git remote -v)] " to check whether any remote upstream exists. If exists it moves forward to next check else it appends USER and DATE to VERSION. Fixes golang/go#29929
This commit is contained in:
Родитель
d13887be63
Коммит
2a466b1cf9
|
@ -9,7 +9,7 @@ if ! git diff-index HEAD --quiet || ! git diff-files --quiet; then
|
|||
VERSION=$VERSION-dirty
|
||||
dirty=1
|
||||
fi
|
||||
if [ -n "$dirty" ] || [ -z "$(git ls-remote)"] || [ -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"
|
||||
|
|
Загрузка…
Ссылка в новой задаче