From: Daniel Turull <[email protected]>

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 <[email protected]>
---
 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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#236855): 
https://lists.openembedded.org/g/openembedded-core/message/236855
Mute This Topic: https://lists.openembedded.org/mt/119271059/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to