Merge pull request #6626 from ipfs/fix/6622

build: fix build when we don't have a full git tree
This commit is contained in:
Steven Allen 2019-09-04 15:01:14 -07:00 committed by GitHub
commit 1bcea7c5ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,2 +1,4 @@
git-hash:=$(shell git describe --always --match=NeVeRmAtCh --dirty 2>/dev/null)
# First try to "describe" the state. This tells us if the state is dirty.
# If that fails (e.g., we're building a docker image and have an empty objects
# directory), assume the source isn't dirty and build anyways.
git-hash:=$(shell git describe --always --match=NeVeRmAtCh --dirty 2>/dev/null || git rev-parse --short HEAD 2>/dev/null)