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

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


Kyle Meyer <kyle@kyleam.com> writes:

> On 09/23/21 17:17:48 -0400, No Wayman wrote:

> It looks like you've unintentionally added a ')' to the end of 
> the
> GITVERSION line.

Apologies. Must've been a stray.

> Another approach would be to update org.el's version to contain
> something that still signals "-dev" but won't trigger the 
> "Invalid
> version syntax" (which, based on grepping the Emacs repo, is 
> signaled by
> version-to-list).  But given that in the current setup a clone 
> with tags
> wouldn't use the header version, stripping -dev for consistency 
> sounds
> like the way to go.

I agree we should keep it simple and consistent.

Out of curiosity I ran this against the repo to see if the 
"Version" metadata had always followed its current convention:

git grep "Version:" $(git rev-list --all) -- lisp/org.el

Looks like the "-dev" suffix goes back to "9.4-dev" and before 
that we have "8.4-git" and "6.08-pre01".
I'm not sure what Org's convention is here, but the patsubst could 
be adjusted to be more flexible if necessary.

I tried to be more concrete with the commit message.
See attached.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-mk-targets.mk-Fix-ORGVERSION-in-tag-less-repos.patch --]
[-- Type: text/x-patch, Size: 1416 bytes --]

From 164029cb66eed8d47d7eb69d449660964749195d 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): trim "-dev" suffix from ORGVERSION.

61336f80 uses org.el's Version metadata to generate ORGVERSION when
the source repository has no tags.
This can result in an org-version of "Major.Minor-dev".
The "-dev" suffix is not recognized by `version-to-list' as a valid
version syntax because it is not part of `version-regexp-alist'.
---
 mk/targets.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mk/targets.mk b/mk/targets.mk
index 693e3781f..ee6f3f344 100644
--- a/mk/targets.mk
+++ b/mk/targets.mk
@@ -15,8 +15,8 @@ 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"))')
+    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)
-- 
2.33.0


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

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20  4:37 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
2021-09-23 22:24         ` Kyle Meyer
2021-09-23 23:13           ` No Wayman [this message]
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=87tuiaub7y.fsf@gmail.com \
    --to=iarchivedmywholelife@gmail.com \
    --cc=eibhear.geo@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kyle@kyleam.com \
    --cc=marcowahlsoft@gmail.com \
    --cc=wtd@pobox.com \
    --subject='Re: Switching to new Git repositories' \
    /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

Code repositories for project(s) associated with this 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).