diff --git a/src/common/endoflife.py b/src/common/endoflife.py index a838982b..cb357ce1 100644 --- a/src/common/endoflife.py +++ b/src/common/endoflife.py @@ -21,6 +21,7 @@ class AutoConfig: self.script = f"{self.method}.py" self.url = data[self.method] self.version_template = Template(data.get("template", DEFAULT_VERSION_TEMPLATE)) + self.disabled = data.get("disabled", False) regexes_include = data.get("regex", DEFAULT_VERSION_REGEX) regexes_include = regexes_include if isinstance(regexes_include, list) else [regexes_include] @@ -45,6 +46,9 @@ class AutoConfig: logging.debug(f"{version} does not match any include or exclude patterns") return None + def is_disabled(self) -> bool: + return self.disabled + def is_excluded(self, version: str) -> bool: return self.first_match(version) is None diff --git a/update-release-data.py b/update-release-data.py index 185b15d5..ad21f085 100644 --- a/update-release-data.py +++ b/update-release-data.py @@ -121,6 +121,10 @@ def run_scripts(summary: GitHubStepSummary, products: list[ProductFrontmatter], try: __delete_data(product) for config in configs: + if config.is_disabled() and not force: + logging.info(f"skipping script {config.script} for {product.name} as it is disabled") + continue + success = __run_script(product, config, exec_summary) if not success: __revert_data(product)