poky.yaml: introduce DISTRO_LATEST_TAG

Introduce the DISTRO_LATEST_TAG macro, which should always point to the
latest existing tag in the documentation, unlike DISTRO which may point
to A.B.999 to represent the tip of a branch.

This variable is needed to fix dead links in the documentation that
currently use the DISTRO macro.

Also, make DISTRO_REL_TAG use the DISTRO macro directly, to avoid
repetition, and add a DISTRO_REL_LATEST_TAG macro that has the same role
as DISTRO_LATEST_TAG but with "yocto-" prepended to it.

In set_versions.py, run the "git describe --abbrev=0 --tags
--match='yocto-*'" command to get the latest existing tag on the
currently checked out commit. Fallback to ourversion in case we didn't
find any.

(From yocto-docs rev: 4195f52117b8132b46dd562acaf40e6e4480be33)

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
(cherry picked from commit a85b0e500c94921f77fa7b7dbb877e4945f96d1e)
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
Antonin Godard
2025-04-09 11:55:41 +02:00
committed by Steve Sakoman
parent c9de4c568e
commit 2323e6e07a
2 changed files with 25 additions and 2 deletions

View File

@@ -2,13 +2,22 @@
# Macros used in the documentation
#
# The DISTRO variable represents the current docs version. It should be used
# when referring to the current docs version. See also DISTRO_LATEST_TAG.
DISTRO : "5.0"
# The DISTRO_LATEST_TAG represents the latest tag on the current branch. It
# should be used in HTTP link referring to the current docs version. In these
# cases, the DISTRO may point to A.B.999 which does not exist (just used to
# represent the latest HEAD revision on the branch). DISTRO_LATEST_TAG should
# always point to an existing tag.
DISTRO_LATEST_TAG : "5.0"
DISTRO_NAME_NO_CAP : "scarthgap"
DISTRO_NAME : "Scarthgap"
DISTRO_NAME_NO_CAP_MINUS_ONE : "nanbield"
DISTRO_NAME_NO_CAP_LTS : "scarthgap"
YOCTO_DOC_VERSION : "5.0"
DISTRO_REL_TAG : "yocto-5.0"
DISTRO_REL_TAG : "yocto-$DISTRO;"
DISTRO_REL_LATEST_TAG : "yocto-&DISTRO_LATEST_TAG;"
DOCCONF_VERSION : "dev"
BITBAKE_SERIES : ""
YOCTO_DL_URL : "https://downloads.yoctoproject.org"