From 9b81f396e69af146faceb13f5602fb6aa06a84e0 Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Thu, 23 Sep 2021 17:13:34 -0400 Subject: [PATCH] mk/targets.mk: Fix ORGVERSION in tag-less repos * mk/targets.mk (ORGVERSION, GITVERSION): properly generate ORGVERSION. Fix bug introduced 61336f80 which caused ORGVERSION to be generated as "Major.Minor-dev" instead of "Major.Minor" in tag-less repos. --- mk/targets.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mk/targets.mk b/mk/targets.mk index 693e3781f..35383f173 100644 --- a/mk/targets.mk +++ b/mk/targets.mk @@ -15,9 +15,9 @@ ifneq ($(wildcard .git),) 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) + ORGVERSION := $(patsubst %-dev,%,$(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 -- 2.33.0