- remove the use of environment variables to get directory paths,
- make use of arguments / argparse instead of environment variables in `update.py` and `report.py`,
- automatically guess the data directory in `latest.py` based on the script's location,
- propagate log level to auto scripts,
- move `list_configs_from_argv` from `endoflife` module to `releasedata` module,
- use `list_products` in `latest.py` to load the product's frontmatters.
Always save cache, even if one of the scripts returned an error.
Also use a workflow to clear the cache instead of relying on josStorer/get-current-time@v2.
Allow stale responses in case of error in order to reduce the number of temporary errors.
Note that the cache will be reset on the first build of every week in any cases, see .github/workflows/update.yml.
Replace request_html by playwright, as request_html, as it is [not maintained anymore](https://pypi.org/project/requests-html/) and scripts using it, such as artifactory.py, started to fail.
This is good because checking out a non-existing branch:
- takes nearly 30s, and most PR does not have a branch with the same name declared in both release-data and endoflife.date repository,
- pollute workflow summary with cryptic error messages.
So overall this save a lot of time and is cleaner.
Reasons were:
- one language make it easier for maintenance,
- workflow simplification,
- not stopping when a script fails anymore (it's better to have a partial update than nothing),
- use `GITHUB_OUTPUT` instead of the deprecated `set-output` command,
- display a workflow summary with statistics about scripts and information about updated products.
The commit message is not as good as it used to be, but it makes the diff process agnostic from the file format (will be needed soon when it will change), and it handles versions updates / removal, which was not supported by the previous script.
Cleanup unused code in update.rb: all methods are now handled by custom scripts. This should fix errors encountered in update.yml workflow (such as https://github.com/endoflife-date/release-data/actions/runs/7279373761) since the dependency to psych has been removed.
This also reformat and update the update.yml workflow so that two workflows targeting the same branch cannot run concurrently. This change has been done because in such cases the last one always fail (changes cannot be commited because the previous workflow already update the branch).
Fixes#260.
This script is using the GitHub CLI with the GraphQL API in order to retrieve releases. The reasons are:
- using 'gh release list' does not return all the releases
- using the API, directly or via GitHub CLI, is slow, produces a lot of 502 errors, and is harder due to pagination.
- using the GraphQL API directly is hard due to pagination.
- using a library, such as graphql-python, is sightly harder than using the GitHub CLI (and still requires a GITHUB_TOKEN).
Access to the GitHub token is required when using GitHub CLI, hence the update.yml workflow update.
Fetch Java versions with their dates from https://www.java.com/releases/.
This script is using a new dependency: requests-html (https://requests-html.kennethreitz.org/). This is because https://www.java.com/releases/ needs JavaScript to render correctly. And for this to work requests-html automatically downloads Chromium because of its dependency to pyppeteer.
Chromium is downloaded into PYPPETEER_HOME, so the workflow has been modified to set this directory as a subdirectory of ~/.cache. Note that declaring the same environment variable from the python script does not work.
If you push a branch to the main repo, and a branch here with the same
name, then the update script here will use the same branch name instead
of using `main`. This way, we can keep 2 branches in sync and then merge
them.
If a branch does not exist, we'll fallback to cloning master instead