[PATCH 2/2] Makefile: add a releases.json target

Antonin Godard
2026-02-25T12:06:12Z

Add a new releases.json target which can be used to update the
releases.json file manually. It is called from the publish target only
(which is the one used on the Autobuilder).

A warning is printed when the file is not up-to-date anymore.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
documentation/Makefile | 9 +++++++--
documentation/tools/host_packages_scripts/almalinux_docs.sh | 2 +-
documentation/tools/host_packages_scripts/fedora_docs.sh | 2 +-
documentation/tools/host_packages_scripts/opensuse_docs.sh | 2 +-
documentation/tools/host_packages_scripts/ubuntu_docs.sh | 2 +-
5 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/documentation/Makefile b/documentation/Makefile
index e144a50b4..00c7d957d 100644
--- a/documentation/Makefile
+++ b/documentation/Makefile
@@ -24,9 +24,9 @@ endif
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

-.PHONY: all checks help Makefile clean stylecheck publish epub latexpdf
+.PHONY: all checks help Makefile clean stylecheck publish epub latexpdf releases.json

-publish: Makefile checks epub latexpdf html singlehtml
+publish: releases.json Makefile checks epub latexpdf html singlehtml
rm -rf $(BUILDDIR)/$(DESTDIR)/
mkdir -p $(BUILDDIR)/$(DESTDIR)/
cp -r $(BUILDDIR)/html/* $(BUILDDIR)/$(DESTDIR)/
@@ -73,6 +73,11 @@ latexpdf: $(PDFs)
$(SOURCEDIR)/set_versions.py
buf_size=10000000 $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

+releases.json:
+ command -v curl jq || echo "curl and jq need to be installed for this target"
+ curl https://dashboard.yoctoproject.org/releases.json | jq --indent 2 >$(SOURCEDIR)/releases.json
+ git --no-pager diff --exit-code -- $(SOURCEDIR)/releases.json || echo "WARNING: releases.json needs to be updated"
+
all: html epub latexpdf

# Catch-all target: route all unknown targets to Sphinx using the new
diff --git a/documentation/tools/host_packages_scripts/almalinux_docs.sh b/documentation/tools/host_packages_scripts/almalinux_docs.sh
index 9202afc5b..e12198db3 100644
--- a/documentation/tools/host_packages_scripts/almalinux_docs.sh
+++ b/documentation/tools/host_packages_scripts/almalinux_docs.sh
@@ -1 +1 @@
-sudo dnf install -y git glibc-locale-source librsvg2-tools make python3-pip which
+sudo dnf install -y curl git jq glibc-locale-source librsvg2-tools make python3-pip which
diff --git a/documentation/tools/host_packages_scripts/fedora_docs.sh b/documentation/tools/host_packages_scripts/fedora_docs.sh
index 8188d529a..f07139d04 100644
--- a/documentation/tools/host_packages_scripts/fedora_docs.sh
+++ b/documentation/tools/host_packages_scripts/fedora_docs.sh
@@ -1 +1 @@
-sudo dnf install git glibc-locale-source librsvg2-tools make python3-pip which
+sudo dnf install curl git jq glibc-locale-source librsvg2-tools make python3-pip which
diff --git a/documentation/tools/host_packages_scripts/opensuse_docs.sh b/documentation/tools/host_packages_scripts/opensuse_docs.sh
index 7d36eb0f9..9d56fc2b8 100644
--- a/documentation/tools/host_packages_scripts/opensuse_docs.sh
+++ b/documentation/tools/host_packages_scripts/opensuse_docs.sh
@@ -1 +1 @@
-sudo zypper install git glibc-i18ndata make python3-pip rsvg-convert which
+sudo zypper install curl git jq glibc-i18ndata make python3-pip rsvg-convert which
diff --git a/documentation/tools/host_packages_scripts/ubuntu_docs.sh b/documentation/tools/host_packages_scripts/ubuntu_docs.sh
index c322b61e4..1ddd24347 100644
--- a/documentation/tools/host_packages_scripts/ubuntu_docs.sh
+++ b/documentation/tools/host_packages_scripts/ubuntu_docs.sh
@@ -1 +1 @@
-sudo apt install git librsvg2-bin locales make python3-saneyaml python3-sphinx-rtd-theme python3-sphinx-copybutton sphinx
+sudo apt install curl git jq librsvg2-bin locales make python3-saneyaml python3-sphinx-rtd-theme python3-sphinx-copybutton sphinx

--
2.52.0