@cryptotaxi247 / kubo / commits / aba6c3d2f

build: fix build when we don't have a full git tree

When building with docker, we don't have a _full_ git repo.

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