|
From: | Max Nikulin |
Subject: | Re: [PATCH] Support building Org from shallow clone [9.6.1 (release_9.6.1-137-gecb62e @ /home/n/.emacs.d/elpaca/builds/org/)] |
Date: | Fri, 20 Jan 2023 21:50:50 +0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
On 20/01/2023 19:44, Ihor Radchenko wrote:
diff --git a/mk/targets.mk b/mk/targets.mk index 4435daa..164b092 100644 --- a/mk/targets.mk +++ b/mk/targets.mk @@ -14,7 +14,7 @@ ifneq ($(wildcard .git),) # Use the org.el header. ORGVERSION := $(patsubst %-dev,%,$(shell $(BATCH) --eval "(require 'lisp-mnt)" \ --visit lisp/org.el --eval '(princ (lm-header "version"))')) - GITVERSION ?= $(shell git describe --match release\* --abbrev=6 HEAD)+ GITVERSION ?= $(shell git describe --match release\* --abbrev=6 HEAD 2>/dev/null || echo "release_N/A-N/A-$(shell git log --format=%h
another option is to use --always git describe --match release\* --abbrev=6 --always HEAD 52f29dand some make code that prepends it with release_$(ORGVERSION)- if it has not release prefix.
Earlier posted patches attempts to make remote query even if history depth of local copy is enough to include a commit tagged as release. I have found some recipes how to modify "git fetch" to get enough objects for "git describe", but I have never used them, so unsure concerning their reliability. Perhaps they may be used in CI configuration, namely in the script preparing source directory, since fetch is not responsibility of make.
[Prev in Thread] | Current Thread | [Next in Thread] |