From 9e401076374f6b9606702546012110ee197bdd2a Mon Sep 17 00:00:00 2001 From: Amogh Desai Date: Fri, 30 Aug 2024 15:52:47 +0530 Subject: [PATCH] Fixing version bump issue when all changes are misc (#41875) --- .../prepare_providers/provider_documentation.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py b/dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py index 87d27845dbed3..dc14ea6d08dbf 100644 --- a/dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py +++ b/dev/breeze/src/airflow_breeze/prepare_providers/provider_documentation.py @@ -487,6 +487,8 @@ def _update_version_in_provider_yaml( maybe_with_new_features = True elif type_of_change == TypeOfChange.BUGFIX: v = v.bump_patch() + elif type_of_change == TypeOfChange.MISC: + v = v.bump_patch() provider_yaml_path = get_source_package_path(provider_package_id) / "provider.yaml" original_provider_yaml_content = provider_yaml_path.read_text() new_provider_yaml_content = re.sub( @@ -772,7 +774,12 @@ def update_release_notes( f"[special]{TYPE_OF_CHANGE_DESCRIPTION[type_of_change]}" ) get_console().print() - if type_of_change in [TypeOfChange.BUGFIX, TypeOfChange.FEATURE, TypeOfChange.BREAKING_CHANGE]: + if type_of_change in [ + TypeOfChange.BUGFIX, + TypeOfChange.FEATURE, + TypeOfChange.BREAKING_CHANGE, + TypeOfChange.MISC, + ]: with_breaking_changes, maybe_with_new_features, original_provider_yaml_content = ( _update_version_in_provider_yaml( provider_package_id=provider_package_id, type_of_change=type_of_change @@ -816,7 +823,12 @@ def update_release_notes( get_console().print() if type_of_change == TypeOfChange.DOCUMENTATION: _mark_latest_changes_as_documentation_only(provider_package_id, list_of_list_of_changes) - elif type_of_change in [TypeOfChange.BUGFIX, TypeOfChange.FEATURE, TypeOfChange.BREAKING_CHANGE]: + elif type_of_change in [ + TypeOfChange.BUGFIX, + TypeOfChange.FEATURE, + TypeOfChange.BREAKING_CHANGE, + TypeOfChange.MISC, + ]: with_breaking_changes, maybe_with_new_features, _ = _update_version_in_provider_yaml( provider_package_id=provider_package_id, type_of_change=type_of_change,