Copy releases from products frontmatter (#465)

Copy releases, without their properties, from product data (frontmatter) to release data.

This script is not intended to be declared in the frontmatter: it is for internal use only.
It executes before all other scripts, and helps the following scripts to work with releases.
This commit is contained in:
Marc Wrobel
2025-07-12 12:01:54 +02:00
parent 9f5131469c
commit 42c1189781
3 changed files with 23 additions and 5 deletions

View File

@@ -105,13 +105,18 @@ def run_scripts(summary: GitHubStepSummary, products: list[ProductFrontmatter])
exec_summary = ScriptExecutionSummary()
for product in products:
if not product.has_auto_configs():
continue
configs = product.auto_configs()
if not configs:
continue # skip products without auto configs
# Add default configs
configs = [AutoConfig(product.name, {"_copy_product_releases": ""})] + configs
with GitHubGroup(product.name):
try:
__delete_data(product)
for config in product.auto_configs():
for config in configs:
success = __run_script(product, config, exec_summary)
if not success:
__revert_data(product)