Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: mlflow-automation <mlflow-automation@users.noreply.github.com>
  • Loading branch information
mlflow-automation committed Dec 26, 2023
1 parent 7bcb537 commit 41ab32c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions dev/set-mlflow-spark-scala-version.py
Expand Up @@ -17,11 +17,16 @@ def create_pom_with_pinned_scala_version(pom_file_path: str, scala_version: str)
content = f.read()

# Replace scala.version with the specified scala version
content = re.sub(r"<scala\.version>\d+\.\d+\.\d+</scala\.version>",
f"<scala.version>{scala_version}</scala.version>", content)
content = re.sub(r"<scala\.compat\.version>\d+\.\d+</scala\.compat\.version>",
f"<scala.compat.version>{scala_compat_version}</scala.compat.version>",
content)
content = re.sub(
r"<scala\.version>\d+\.\d+\.\d+</scala\.version>",
f"<scala.version>{scala_version}</scala.version>",
content,
)
content = re.sub(
r"<scala\.compat\.version>\d+\.\d+</scala\.compat\.version>",
f"<scala.compat.version>{scala_compat_version}</scala.compat.version>",
content,
)
with open(pom_file_path, "w") as f:
f.write(content)

Expand Down

0 comments on commit 41ab32c

Please sign in to comment.