Skip to content

Commit

Permalink
Only replace version if at the start of a line
Browse files Browse the repository at this point in the history
  • Loading branch information
girarda committed May 16, 2024
1 parent d9792e7 commit 4910741
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ async def update_package_version(self) -> StepResult:
)

content = await dagger_read_file(repo_dir, file_path)
new_content = re.sub(r"(?<=\bversion = \")(.*)(?=\")", self.new_version, content)
new_content = re.sub(r"^(?<=\bversion = \")(.*)(?=\")", self.new_version, content)
self.repo_dir = await dagger_write_file(repo_dir, file_path, new_content)

if self.export:
Expand Down

0 comments on commit 4910741

Please sign in to comment.