From: Jannis Harder Date: Mon, 23 May 2022 15:04:07 +0000 (+0200) Subject: Change way to get commit sha X-Git-Tag: divfloor-in-write_smt2-old-test~5^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=87149b3f8e64adcd9c4025f58c71cc0afbd10571;p=yosys.git Change way to get commit sha --- diff --git a/Makefile b/Makefile index 6d901956f..7235c9dc3 100644 --- a/Makefile +++ b/Makefile @@ -130,7 +130,7 @@ LDLIBS += -lrt endif YOSYS_VER := 0.17+33 -GIT_REV := $(shell git -C $(YOSYS_SRC) rev-parse --short HEAD 2> /dev/null || echo UNKNOWN) +GIT_REV := $(shell git ls-remote $(YOSYS_SRC) HEAD -q | $(AWK) 'BEGIN {R = "UNKNOWN"}; ($$2 == "HEAD") {R = substr($$1, 1, 9); exit} END {print R}') OBJS = kernel/version_$(GIT_REV).o bumpversion: