All of lore.kernel.org
 help / color / mirror / Atom feed
From: <daniel.turull@ericsson.com>
To: <openembedded-core@lists.openembedded.org>
Cc: Daniel Turull <daniel.turull@ericsson.com>
Subject: [PATCH 2/3] devtool: upgrade: detect per-version release notes files
Date: Tue, 12 May 2026 09:24:45 +0200	[thread overview]
Message-ID: <20260512072446.2323529-3-daniel.turull@ericsson.com> (raw)
In-Reply-To: <20260512072446.2323529-1-daniel.turull@ericsson.com>

From: Daniel Turull <daniel.turull@ericsson.com>

Extend the changelog file detection loop to also match per-version
release notes files like git's Documentation/RelNotes/2.53.0.adoc
or mesa's docs/relnotes/26.0.3.rst.

These are detected by matching filenames that contain a version
number with a documentation extension (.txt, .md, .rst, .adoc).
Their full content is read via git show since they are new files
rather than modifications to an existing changelog.

Assisted-by: kiro:claude-opus-4.6
Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
---
 scripts/lib/devtool/upgrade.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py
index 6adaf5185e..f2a2c8a6fb 100644
--- a/scripts/lib/devtool/upgrade.py
+++ b/scripts/lib/devtool/upgrade.py
@@ -576,6 +576,12 @@ def _extract_changelog(srctree, pn, old_ver, new_ver, old_tag, new_tag, workspac
                     if lines:
                         changelog_content = '\n'.join(lines)
                         break
+            # Per-version release notes (e.g., git RelNotes/2.53.0.adoc, mesa relnotes/26.0.3.rst)
+            elif re.search(r'(\d+[.\-])+\d+\.(txt|md|rst|adoc)$', basename):
+                file_content, _ = _run('git show %s' % shlex.quote('%s:%s' % (new_tag, fname)), srctree)
+                if file_content.strip():
+                    changelog_content = file_content.strip()
+                    break
     except bb.process.ExecutionError as e:
         logger.warning('Changelog file extraction failed: %s' % str(e))
 
-- 
2.34.1



  parent reply	other threads:[~2026-05-12  7:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12  7:24 [PATCH 0/3] devtool: add changelog extraction daniel.turull
2026-05-12  7:24 ` [PATCH 1/3] devtool: upgrade: extract changelog between versions daniel.turull
2026-05-12 16:28   ` [OE-core] " Alexander Kanavin
2026-05-13  7:26     ` Daniel Turull
2026-05-12  7:24 ` daniel.turull [this message]
2026-05-12  7:24 ` [PATCH 3/3] devtool: upgrade: clean up extracted changelog content daniel.turull

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

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

  git send-email \
    --in-reply-to=20260512072446.2323529-3-daniel.turull@ericsson.com \
    --to=daniel.turull@ericsson.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.