Skip to content

Commit

Permalink
fix commands to work for linux (#2355)
Browse files Browse the repository at this point in the history
  • Loading branch information
aimethed authored Oct 24, 2024
1 parent 631c590 commit 2e874be
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/bump_versions/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ def output_xml(soup, filename):

def update_yaml(yaml_files, new_version):
for yml in yaml_files:
subprocess.run(["sed", "-i", '', f"s/\(SemanticVersion:\s*\).*/\\1{new_version}/", yml])
subprocess.run(["sed", "-i", '', f"s/\(CodeUri:.*-\)[0-9]*\.[0-9]*\.[0-9]*\(-\?.*\.jar\)/\\1{new_version}\\2/", yml])
subprocess.run(["sed", "-i", '', f"s|\(athena-federation-repository-.*:\)[0-9]*\.[0-9]*\.[0-9]*\(\'\)|\\1{new_version}\\2|", yml])
subprocess.run(["sed", "-i", f"s/\(SemanticVersion:\s*\).*/\\1{new_version}/", yml])
subprocess.run(["sed", "-i", f"s/\(CodeUri:.*-\)[0-9]*\.[0-9]*\.[0-9]*\(-\?.*\.jar\)/\\1{new_version}\\2/", yml])
subprocess.run(["sed", "-i", f"s|\(athena-federation-repository-.*:\)[0-9]*\.[0-9]*\.[0-9]*\(\'\)|\\1{new_version}\\2|", yml])


def update_dockerfile(dockerfiles, new_version):
for file in dockerfiles:
subprocess.run(["sed", "-i", '', f"s|\(target\/.*-\)[0-9]*\.[0-9]*\.[0-9]*|\\1{new_version}|", file])
subprocess.run(["sed", "-i", '', f"s|\(xf\s*.*-\)[0-9]*\.[0-9]*\.[0-9]*|\\1{new_version}|", file])
subprocess.run(["sed", "-i", f"s|\(target\/.*-\)[0-9]*\.[0-9]*\.[0-9]*|\\1{new_version}|", file])
subprocess.run(["sed", "-i", f"s|\(xf\s*.*-\)[0-9]*\.[0-9]*\.[0-9]*|\\1{new_version}|", file])


def update_project_version(soup, new_version):
Expand Down

0 comments on commit 2e874be

Please sign in to comment.