v0.43.1
This commit is contained in:
1 parent
5b6d4a7903
commit
4d1087e357
160 files changed
+2407
-1933
No files matched your search
@@ -4,12 +4,10 @@ from pathlib import Path
|
||||
import sys
|
||||
import tomllib
|
||||
|
||||
|
||||
def project_version(root: Path | None = None) -> str:
|
||||
manifest = (root or Path(__file__).resolve().parents[1]) / "Cargo.toml"
|
||||
data = tomllib.loads(manifest.read_text(encoding="utf-8"))
|
||||
return data["package"]["version"]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(project_version(Path(sys.argv[1]) if len(sys.argv) > 1 else None))
|
||||
Reference in new issue
Block a user