Skip to content

Commit

Permalink
Fixing version bump issue when all changes are misc (apache#41875)
Browse files Browse the repository at this point in the history
  • Loading branch information
amoghrajesh authored Aug 30, 2024
1 parent 3740b0c commit 9e40107
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 9e40107

Please sign in to comment.