[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals-release/org 61336f8: mk/targets.mk: Add version fallbac
From: |
ELPA Syncer |
Subject: |
[elpa] externals-release/org 61336f8: mk/targets.mk: Add version fallback for tag-less repos |
Date: |
Fri, 5 Feb 2021 01:57:08 -0500 (EST) |
branch: externals-release/org
commit 61336f80dc94a442842289d2f33f91190383e9b2
Author: Kyle Meyer <kyle@kyleam.com>
Commit: Kyle Meyer <kyle@kyleam.com>
mk/targets.mk: Add version fallback for tag-less repos
* mk/targets.mk (ORGVERSION, GITVERSION): Get version from lisp/org.el
header if it can't be retrieved from git-describe.
As of elpa.git's ee03829f90 (Finalize the new master branch,
2020-12-14), org-release and org-git-version are empty strings in
https://elpa.gnu.org/packages/org-*.tar files. This is because the
new setup executes `make autoloads info' in an elpa.git worktree with
an Org branch checked out, but elpa.git of course doesn't have Org's
release tags.
Maintaining the org.el version header has been a point of contention
in the past [1], but the header has been there for a while now. Use
it to avoid the above elpa.git issue. In the case of the master
branch, the org-release value generated in a tag-less repo will have a
different version than the one from a regular repo because org.el's
version header has a "-dev" suffix, but that's still better than an
empty version.
[1] For example: https://orgmode.org/list/87zj1uhix6.fsf@gmx.us/
Reported-by: Pierre Langlois <pierre.langlois@gmx.com>
Ref: https://orgmode.org/list/87y2hi9qev.fsf@gmx.com
---
mk/targets.mk | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/mk/targets.mk b/mk/targets.mk
index 15cbdfa..fc5bed1 100644
--- a/mk/targets.mk
+++ b/mk/targets.mk
@@ -11,8 +11,16 @@ INSTSUB = $(SUBDIRS:%=install-%)
ORG_MAKE_DOC ?= info html pdf
ifneq ($(wildcard .git),)
- GITVERSION ?= $(shell git describe --match release\* --abbrev=6 HEAD)
ORGVERSION ?= $(subst release_,,$(shell git describe --match release\*
--abbrev=0 HEAD))
+ ifeq ($(ORGVERSION),)
+ # In elpa.git, there are no tags available. Fall back to using
+ # the org.el header.
+ ORGVERSION := $(shell $(BATCH) --eval "(require 'lisp-mnt)" \
+ --visit lisp/org.el --eval '(princ (lm-header "version"))')
+ GITVERSION ?= $(ORGVERSION)-g$(shell git rev-parse --short=6 HEAD)
+ else
+ GITVERSION ?= $(shell git describe --match release\* --abbrev=6 HEAD)
+ endif
GITSTATUS ?= $(shell git status -uno --porcelain)
else
-include mk/version.mk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals-release/org 61336f8: mk/targets.mk: Add version fallback for tag-less repos,
ELPA Syncer <=