| Message ID | 20260225-releases-json-v1-2-fee3f01b9197@bootlin.com |
|---|---|
| State | New |
| Headers | show |
| Series | set_versions.py: build with versions from releases.json | expand |
Hi Antonin, Please provide context, what is this helping with? On 2/25/26 1:06 PM, Antonin Godard via lists.yoctoproject.org wrote: > 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 Do we really need jq? What is this bringing? It won't be human-consumed anyway, so who cares for the indent? Why do we need to download the file during the publish state? Cannot we make the autobuilder download the file and put it in the right place? This will also avoid the case where the file gets changed while the autobuilder builds one earlier release and the latest one. Cheers, Quentin
Hi, On Wed Feb 25, 2026 at 3:10 PM CET, Quentin Schulz via lists.yoctoproject.org wrote: > Hi Antonin, > > Please provide context, what is this helping with? It's helping when updating this file is needed (but see below). > On 2/25/26 1:06 PM, Antonin Godard via lists.yoctoproject.org wrote: >> 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 > > Do we really need jq? What is this bringing? It won't be human-consumed > anyway, so who cares for the indent? Updates to this file would possibly be posted on the list. Having them formatted make the diffs readable. > Why do we need to download the file during the publish state? Cannot we > make the autobuilder download the file and put it in the right place? > This will also avoid the case where the file gets changed while the > autobuilder builds one earlier release and the latest one. That's correct, thanks! I reconsidered this and opted for a different approach which I'll send shortly. Antonin
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
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(-)