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

Antonin Godard
2026-02-26T13:53:41Z

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