1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-08-06 19:44:01 +08:00
Files
kubo/mk/git.mk
Steven Allen aba6c3d2f8 build: fix build when we don't have a full git tree
When building with docker, we don't have a _full_ git repo.
2019-09-04 13:37:20 -07:00

5 lines
338 B
Makefile

# 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)