emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: No Wayman <iarchivedmywholelife@gmail.com>
To: marcowahlsoft@gmail.com
Cc: wtd@pobox.com, emacs-orgmode@gnu.org, eibhear.geo@gmail.com
Subject: Re: Switching to new Git repositories
Date: Thu, 23 Sep 2021 17:17:48 -0400	[thread overview]
Message-ID: <87y27nt29u.fsf@gmail.com> (raw)
In-Reply-To: <874kab2js1.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 513 bytes --]

> Sounds like a weird issue.  I don't think this 9.5-dev tag is 
> something from the Org repo.

There is a bug in mk/targets.mk introduced by 61336f80dc.
As others have pointed out, the new repository does not have tags.
As a fallback, org.el's version is read in it's header.
However, it looks like Kyle forgot to trim that string so we get 
ORGVERSION set to "9.5-dev" instead of "9.5".
This causes `org-version' to return an incorrect version string.

The attached patch addresses the issue in the makefile.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix ORGVERSION in targets.mk --]
[-- Type: text/x-patch, Size: 1335 bytes --]

From 9b81f396e69af146faceb13f5602fb6aa06a84e0 Mon Sep 17 00:00:00 2001
From: Nicholas Vollmer <iarchivedmywholelife@gmail.com>
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


  reply	other threads:[~2021-09-23 21:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20  4:37 Switching to new Git repositories Bastien
2021-09-20  9:08 ` Marco Wahl
2021-09-20  9:16   ` Timothy
     [not found]     ` <87ilyvtwma.fsf@gnu.org>
2021-09-20 10:30       ` Marco Wahl
2021-09-25 13:50         ` Bastien
2021-09-20  9:27   ` Bastien
2021-09-20 10:14     ` Eric S Fraga
2021-09-20 10:20       ` Bastien
2021-09-20 10:38         ` Eric S Fraga
2021-09-23 10:07 ` Éibhear
2021-09-23 15:17   ` Nick Dokos
2021-09-23 17:40     ` Colin Baxter
2021-09-23 18:54       ` Marco Wahl
2021-09-23 18:06   ` William Denton
2021-09-23 18:23     ` Éibhear
2021-09-23 19:05       ` Colin Baxter
2021-09-23 19:07     ` Marco Wahl
2021-09-23 21:17       ` No Wayman [this message]
2021-09-23 22:24         ` Kyle Meyer
2021-09-23 23:13           ` No Wayman
2021-09-24  1:48             ` Kyle Meyer
2021-09-24  3:21         ` William Denton
2021-09-24  7:50     ` Eric S Fraga
2021-09-25 14:57   ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y27nt29u.fsf@gmail.com \
    --to=iarchivedmywholelife@gmail.com \
    --cc=eibhear.geo@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=marcowahlsoft@gmail.com \
    --cc=wtd@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).