replicate 2.0.0

Copies the currently running program into a temporary location
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env python3
"""Replace the sentinel crate version with the release version."""

import sys
from pathlib import Path


VERSION = sys.argv[1]

path = Path("Cargo.toml")
text = path.read_text()
updated = text.replace('version = "0.0.0"', f'version = "{VERSION}"', 1)
path.write_text(updated)