Package workstation tools, reuse emulator sessions, and derive build versions

This commit is contained in:
2026-09-23 03:45:48 +08:00
parent 6bfcce8070
commit f5d9f96409
79 changed files with 878 additions and 132 deletions
Executable
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env python3
"""Print the FDS version derived from release tags or a Git source export."""
import argparse
import subprocess
from pathlib import Path
from fds_version import ROOT, cargo, version
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--root', type=Path, default=ROOT)
parser.add_argument('--cargo', action='store_true', help='emit Cargo build metadata and change tracking')
args = parser.parse_args()
try:
if args.cargo:
cargo(args.root.resolve())
else:
print(version(args.root))
except (OSError, ValueError, subprocess.CalledProcessError) as error:
parser.exit(1, f'Cannot determine FDS version: {error}\n')