1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #22047 from ncopa/fix-build-from-tarball

Fix detection of git commit during build from tarball
This commit is contained in:
David Calavera 2016-04-14 10:42:45 -07:00
commit 6472a6d9e5

View file

@ -79,7 +79,7 @@ DEFAULT_BUNDLES=(
)
VERSION=$(< ./VERSION)
if command -v git &> /dev/null && git rev-parse &> /dev/null; then
if command -v git &> /dev/null && [ -d .git ] && git rev-parse &> /dev/null; then
GITCOMMIT=$(git rev-parse --short HEAD)
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
GITCOMMIT="$GITCOMMIT-unsupported"