public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
From: Antonin Godard <antonin.godard@bootlin.com>
To: docs@lists.yoctoproject.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	 Antonin Godard <antonin.godard@bootlin.com>
Subject: [PATCH] set_versions.py: remove missing_tags array
Date: Thu, 08 Jan 2026 09:28:07 +0100	[thread overview]
Message-ID: <20260108-update-missing-tags-v1-1-ff1986f73c73@bootlin.com> (raw)

As we now have tagged the documentation with all the missing tags, we
can remove the missing_tags array and also the sorting algorithm, since
git already sorts them.

One thing that should be noted: the yocto-1.4.5 docs page will be
removed after this. In fact, 1.4.5 was never released for Poky[1], so
there is no need to publish documentation for it.

[1]: https://lists.yoctoproject.org/g/yocto/topic/status_of_dylan_9_0_4/61295742

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 documentation/set_versions.py | 30 +-----------------------------
 1 file changed, 1 insertion(+), 29 deletions(-)

diff --git a/documentation/set_versions.py b/documentation/set_versions.py
index 91aa2bdf2..5123019da 100755
--- a/documentation/set_versions.py
+++ b/documentation/set_versions.py
@@ -263,35 +263,7 @@ print("switchers.js generated from switchers.js.in")
 
 # generate releases.rst
 
-# list missing tags in yocto-docs
-missing_tags = [
-        'yocto-0.9',
-        'yocto-1.0', 'yocto-1.0.1',
-        'yocto-1.1', 'yocto-1.1.1',
-        'yocto-1.2',
-        'yocto-1.4.4', 'yocto-1.4.5',
-        'yocto-1.5', 'yocto-1.5.2', 'yocto-1.5.3', 'yocto-1.5.4',
-        'yocto-1.6', 'yocto-1.6.1', 'yocto-1.6.2',
-        'yocto-1.7', 'yocto-1.7.1',
-        'yocto-1.9',
-        'yocto-2.5.3',
-        'yocto-3.1', 'yocto-3.1.1', 'yocto-3.1.2', 'yocto-3.1.3',
-        ]
-
-semver = re.compile(r'yocto-(\d+)\.(\d+)(?:\.)?(\d*)')
-
-# git is able to properly order semver versions but not python
-# instead of adding a dependency on semver module, let's convert the version
-# into a decimal number, e.g. 11.23.1 will be 112301 and 1.5 will be 010500 so
-# it can be used as a key for the sorting algorithm.
-# This can be removed once all the old tags are re-created.
-def tag_to_semver_like(v):
-    v_semver = semver.search(v)
-    v_maj, v_min, v_patch = v_semver.groups('0')
-    return int("{:0>2}{:0>2}{:0>2}".format(v_maj, v_min, v_patch), 10)
-
-yocto_tags = subprocess.run(["git", "tag", "--list", "--sort=version:refname", "yocto-*"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout
-yocto_tags = sorted(yocto_tags.split() + missing_tags, key=tag_to_semver_like)
+yocto_tags = subprocess.run(["git", "tag", "--list", "--sort=version:refname", "yocto-*"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout.split()
 tags = [tag[6:] for tag in yocto_tags]
 
 with open('releases.rst', 'w') as f:

---
base-commit: f9042e1da554017fe46460c1fd2bdf8c74b3fa18
change-id: 20241029-update-missing-tags-277b255fbadd



             reply	other threads:[~2026-01-08  8:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-08  8:28 Antonin Godard [this message]
2026-01-13 13:09 ` [PATCH] set_versions.py: remove missing_tags array Antonin Godard

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=20260108-update-missing-tags-v1-1-ff1986f73c73@bootlin.com \
    --to=antonin.godard@bootlin.com \
    --cc=docs@lists.yoctoproject.org \
    --cc=thomas.petazzoni@bootlin.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox