Commit Graph

12 Commits

Author SHA1 Message Date
Marc Wrobel
391d65ad8a Simplify argument parsing (#459)
With the current state of automation scripts, this is not possible anymore to launch script with multiple auto configs.
2025-07-06 22:42:01 +02:00
Marc Wrobel
c78d1fe2b5 Refactor scripts arguments handling (#456)
- 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.
2025-06-28 19:05:07 +02:00
Marc Wrobel
f404274310 Align custom scripts with generic scripts (#445)
Align custom scripts with generic scripts, making them configurable. This has a few advantages:

- script code is more unified,
- no more hard-coded method names in scripts, which is less error prone and make it easier to rename scripts,
- no more hard coded product names in scripts, which is less error prone and make it easier to rename products,
- less hard-coded URLs and regexes in scripts, which makes auto-configuration more expressive / updatable,

Also added method `endoflife.list_configs_from_argv()` so that it is easier to manipulate scripts arguments.
2025-06-07 17:25:05 +02:00
Daniel
9e073c226e [red-hat-openshift] Fix pattern (#379)
The Red Hat people changed the format of the dates AND the format of the versions from this:

=== RHSA-2024:5808 - {product-title} 4.12.64 bug fix and security update

to this

=== RHSA-2024:0041 - {product-title} {product-version}.0 image release, bug fix, and security update advisory.

But not for all branches, but only for the latest (4.16 and up).

Fixes #378
2024-09-06 20:26:53 +02:00
Marc Wrobel
56cc29b49d Make releasedata.Product usable in 'with' expression (#294)
This way the writing of the JSON file is handled automatically if the update does not fail.
It pave the way to further global improvements, such as a better error handling.
2024-02-04 14:48:05 +01:00
Marc Wrobel
b339c81ead Split endoflife.date and releasedata models in separate files (#276)
This makes the code easier to read.
2024-01-07 20:22:46 +01:00
Marc Wrobel
f6a8349c46 Centralize GitHub Workflow groups declaration (#272)
It may not be the best place for that (gha.py would have been better), but it's the shorter / faster way to do it for now.

Moreover it now uses logging for writing the group. The logger format has been updated for this to work. This was done to fix issues on GitHub Action logs, where groups were declared after the logs.
2023-12-31 17:00:11 +01:00
Marc Wrobel
47e29992ae Enable flake8-use-pathlib linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth.
2023-12-30 14:29:24 +01:00
Marc Wrobel
6002cbdb26 Enable isort linting rules (#267)
See https://docs.astral.sh/ruff/rules/#isort-i.
2023-12-30 14:29:24 +01:00
Marc Wrobel
6d922a8e9c [red-hat-openshift] Refactor script (#243)
Make the script more readable, mostly by:

- using the Product class,
- a little bit of renaming and documentation,
- removing the use of functions when unnecessary.
2023-12-11 22:44:04 +01:00
Marc Wrobel
600e77e212 Sort versions by date then version for all products (#179) 2023-11-15 22:30:31 +01:00
Daniel
897d514e7f Add red-hat-openshift script (#119)
The script only get versions 4.x and above, see script comments for more informations.

Note that the code related to git has been extracted to a common script so that it can be reused for the Debian script.
2023-07-15 18:26:11 +02:00