Skip to content

Commit 987cda4

Browse files
committed
add missing newlines
1 parent 0cb571e commit 987cda4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/scripts/update_chart_files.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ def update_chart_yaml(chart_folder, new_version, old_version):
8383

8484
# Update appVersion line
8585
chart_content = re.sub(
86-
r'^appVersion:\s*["\']?([^\s"\']+)["\']?\s*$',
87-
f"appVersion: {new_version}",
86+
r'^(appVersion:\s*)["\']?([^\s"\']+)["\']?(\s*)$',
87+
rf"\g<1>{new_version}\g<3>",
8888
chart_content,
8989
flags=re.MULTILINE,
9090
)
@@ -103,8 +103,8 @@ def update_chart_yaml(chart_folder, new_version, old_version):
103103
new_chart_version = bump_chart_version(old_chart_version, bump_type)
104104

105105
chart_content = re.sub(
106-
r"^version:\s*[0-9]+\.[0-9]+\.[0-9]+\s*$",
107-
f"version: {new_chart_version}",
106+
r"^(version:\s*)[0-9]+\.[0-9]+\.[0-9]+(\s*)$",
107+
rf"\g<1>{new_chart_version}\g<2>",
108108
chart_content,
109109
flags=re.MULTILINE,
110110
)
@@ -157,7 +157,7 @@ def update_changelog(
157157
return
158158

159159
current_date = datetime.utcnow().strftime("%Y-%m-%d")
160-
changelog_entry = f"## [{new_chart_version}] - {current_date}\n\n### Updated\n- Updated application from {old_version} to {new_version}\n"
160+
changelog_entry = f"## [{new_chart_version}] - {current_date}\n\n### Updated\n- Updated application from {old_version} to {new_version}\n\n"
161161

162162
changelog_path = f"charts/{chart_folder}/CHANGELOG.md"
163163
if os.path.exists(changelog_path):

0 commit comments

Comments
 (0)