Skip to contentSkip to conversation

set_versions/switchers.js: Allow switchers.js version information to be autogenerated

PATCH Richard Purdie 1 participant 1 message Mar 18, 2022 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 8 lines · Richard Purdie via lists.yoctoproject.org

A horrible blunt hammer approach to updating the version information in switchers.js based on the available tag information.

To merge and work correctly, this will need a change to the autobuilder-helper docs generation code to pull the swicthers.js and script from master, then to run the script. That should hopefully remove the need for other patching even on old docs branches though.

Quoted 7 lines
---
 documentation/.gitignore                      |  1 +
 documentation/set_versions.py                 | 21 +++++++++++++++++++
 .../{switchers.js => switchers.js.in}         |  8 +------
 3 files changed, 23 insertions(+), 7 deletions(-)
 rename documentation/sphinx-static/{switchers.js => switchers.js.in} (97%)

This patch goes a step further and automates the version information inside switchers.js, making set_versions in master definitive for version info.

The actively displayed releases on the website are then simply controlled by the activereleases line at the top of the script.

Updating autobuilder-helper to use this shouldn't be too hard, it should just be a case of pulling the script and switchers.js from master, then running the script. This has not yet been tested with older versions so we need to compare the results before and after to double check all the values/magic is correct.

I did just think of a bug where a release not in switchers.js wouldn't be added and should be (as in older releases). I'll add something for that.

Cheers,

Richard