Skip to content

Commit

Permalink
Refactor: load version from workspace Cargo.toml if it is defined there
Browse files Browse the repository at this point in the history
  • Loading branch information
drmingdrmer committed Feb 25, 2023
1 parent 03c32b0 commit 7785bcc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/build_change_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,13 @@ def load_cargo_version():

t = toml.loads(cargo)
ver = t['package']['version']

if ver == {'workspace': True}:
with open('./Cargo.toml', 'r') as f:
cargo = f.read()
t = toml.loads(cargo)
ver = t['workspace']['package']['version']

print("--- openraft/Cargo.toml version is", ver)
return ver

Expand Down

0 comments on commit 7785bcc

Please sign in to comment.