@@ -36,6 +36,8 @@ class AppConfig: # pylint: disable=too-many-instance-attributes
3636 (default: "AGGREGATE_LATEST_VERSION_CHILDREN")
3737 api_timeout (int): API request timeout in seconds (default: 300)
3838 dry_run (bool): If True, perform a dry run without making changes (default: False)
39+ delete_on_version_suffix_match (bool): Delete existing project when version matches suffix pattern
40+ delete_version_suffix_pattern (str): Regex pattern (case-insensitive) used to detect versions
3941 Raises:
4042 ConfigurationError: If required configuration is missing or invalid
4143 ValidationError: If validation of specific fields fails
@@ -71,6 +73,8 @@ class AppConfig: # pylint: disable=too-many-instance-attributes
7173 is_latest : bool = False
7274 auto_detect_latest : bool = True
7375 dry_run : bool = False
76+ delete_on_version_suffix_match : bool = False
77+ delete_version_suffix_pattern : str = "dev"
7478
7579 # Tags
7680 project_tags : Optional [str ] = None
@@ -203,6 +207,12 @@ def from_environment(cls) -> "AppConfig":
203207 ).strip (),
204208 hierarchy_input_dir = os .getenv ("INPUT_HIERARCHY_INPUT_DIR" , "" ).strip () or None ,
205209 api_timeout = int (os .getenv ("INPUT_API_TIMEOUT" , "300" ).strip ()),
210+ delete_on_version_suffix_match = (
211+ os .getenv ("INPUT_DELETE_ON_VERSION_SUFFIX_MATCH" , "false" ).strip ().lower () == "true"
212+ ),
213+ delete_version_suffix_pattern = (
214+ os .getenv ("INPUT_DELETE_VERSION_SUFFIX_PATTERN" , "dev" ).strip () or "dev"
215+ ),
206216 )
207217
208218 def validate_for_upload (self ) -> None :
0 commit comments