Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…n `pyproject.toml`
  • Loading branch information
agriyakhetarpal committed Sep 4, 2023
1 parent 7c64841 commit 2e332b5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/update_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ def update_version():
file.seek(0)
file.write(replace_version)

# pyproject.toml
with open(os.path.join(pybamm.root_dir(), "pyproject.toml"), "r+") as file:
output = file.read()
replace_version = re.sub(
'(?<=version = ")(.+)(?=")', release_version, output
)
file.truncate(0)
file.seek(0)
file.write(replace_version)

# CITATION.cff
with open(os.path.join(pybamm.root_dir(), "CITATION.cff"), "r+") as file:
output = file.read()
Expand Down

0 comments on commit 2e332b5

Please sign in to comment.