Skip to content

Commit a3846d3

Browse files
committed
all: add flag -dirty to the git version
if the repo is not all checked in, we will append the -dirty flag to the git hash in the build string Signed-off-by: Kieran Levin <ktl@frame.work>
1 parent 5e70fed commit a3846d3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ COSMOCC=../cosmopolitan
55
gpu_cfg_generator.exe: gpu_cfg_generator
66
cp gpu_cfg_gen gpu_cfg_gen.exe
77

8-
GIT_HASH := $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
8+
GIT_HASH := $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")$(shell git diff --quiet && git diff --cached --quiet || echo "-dirty")
99

1010
gpu_cfg_generator: gpu_cfg_generator.c gpu_cfg_generator.h
1111
$(COSMOCC)/bin/cosmocc -o gpu_cfg_gen *.c -I ./ -DGIT_HASH=\"$(GIT_HASH)\"

0 commit comments

Comments
 (0)