Skip to content

Commit e3efec2

Browse files
authored
[Python] Update version.py to bump pyproject.toml automatically (#18248)
This PR updates the `version.py`, so every time when running this file, it also bumps the version number in `pyproject.toml` automatically.
1 parent e465837 commit e3efec2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

version.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
2222
List of affected files:
2323
- tvm-root/python/tvm/libinfo.py
24+
- tvm-root/pyproject.toml
2425
- tvm-root/include/tvm/runtime/base.h
2526
- tvm-root/conda/recipe/meta.yaml
2627
- tvm-root/web/package.json
@@ -175,6 +176,13 @@ def sync_version(pub_ver, local_ver, dry_run):
175176
local_ver,
176177
dry_run,
177178
)
179+
# pyproject.toml
180+
update(
181+
os.path.join(PROJ_ROOT, "pyproject.toml"),
182+
r"(?<=version = \")[.0-9a-z\+]+",
183+
pub_ver,
184+
dry_run,
185+
)
178186
# Use public version for other parts for now
179187
# Note that full git hash is already available in libtvm
180188
# C++ header

0 commit comments

Comments
 (0)