Commit Graph

25 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
312ce078bb Improve HTTP handling in scripts (#449)
Provide some helper methods to hide the complexity of parsing HTML, JSON, YAML, XML or Markdown.
2025-06-28 12:26:10 +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
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
798c298c59 Enable flake8-datetimez linting rules (#267)
See https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz.
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
2c1f083c33 [haproxy] Refactor script (#230)
Make the script more readable, mostly by:

- using the Product classes,
- removing the use of functions when unnecessary,
- a little bit of renaming and documentation.
2023-12-10 22:17:04 +01:00
Marc Wrobel
7cf62c2355 Refactor HTTP common code (#207)
- move to common/http.py,
- make fetch_url return a Response.
2023-12-02 22:52:12 +01:00
Marc Wrobel
981eef5b62 [haproxy] Make HTTP requests in parallel (#192)
It cuts the script execution time roughly by three during my tests.
2023-11-26 15:22:56 +01:00
Marc Wrobel
600e77e212 Sort versions by date then version for all products (#179) 2023-11-15 22:30:31 +01:00
Marc Wrobel
208ab8e2f8 Apply various minor refactorings
Improve readability and fix a few Python warnings (line too long, exception too broad...) through various minor refactorings.
2023-06-11 12:45:59 +02:00
Marc Wrobel
6ba7828f96 Refactor product releases writing
Create a common function to write resulting JSON files to the releases directory.
It makes this task simpler to read and maintain, while making it modifiable at a central point in the future.
One example of such modification could be the sorting of the versions in a uniform way for all the scripts.
2023-06-11 12:45:59 +02:00
Marc Wrobel
a16d9090d3 Refactor HTTP URL fetching scripts
This creates a common function to fetch HTTP URLs, with enhanced capabilities (retry, use of a known User-Agent).
It makes scripts that need those capabilities simpler, while improving other scripts.

This commit also fixes some scripts that did not log properly (cos.py, eks.py, haproxy.py, palo-alto-networks.py, rhel.py, ros.py, unrealircd.py).
2023-06-11 12:45:59 +02:00
Marc Wrobel
803a8be040 Improve and fix haproxy.py
- Get cycles URL by parsing https://www.haproxy.org/download/:
  - This way the script does not have to be updated each time a new minor version is released.
  - The old algorithm was missing some versions (such as 1.6.x).
- Use a GitHub actions log group to wrap the script logs.
- Display version like the other scripts.
2023-01-13 11:02:32 +01:00
Marc Wrobel
b65b5ad4ee Cleanup code (#37)
* [apple,distrowatch,pypi] Remove unused imports

* [maven] use snake_case for variable names

* [eks,palo-alto-networks] Rename variables shadowing names from outer scopes

* [eks,palo-alto-networks] Remove unused variables

* [apple,haproxy,palo-alto-networks,rhel,ros,unrealircd] Rename variables shadowing built-in names
2022-12-14 09:20:45 +05:30
Nemo
931ff74010 [haproxy] v2.7.0 2022-12-02 16:26:19 +05:30
Nemo
fac9620241 [py] Fix styling 2022-10-17 14:21:36 +05:30
Nemo
fc39472416 [pangp] Add Palo Alto Networks GlobalProtect App 2022-05-30 15:31:31 +05:30
Nemo
920138cf6c fix haproxy date 2022-05-24 19:27:13 +05:30
Nemo
869a866e7e Switch haproxy to all changelogs 2022-05-24 18:09:14 +05:30
Nemo
6a08386585 Fix directories 2022-05-24 15:14:14 +05:30
Nemo
624c6a4d14 Add haproxy as custom 2022-05-24 14:55:54 +05:30