v0.29.2
This commit is contained in:
1 parent
76cb4acef0
commit
68678e98be
84 files changed
+1519
-325
No files matched your search
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Read the canonical RustProxy release version from Cargo.toml."""
|
||||
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