xen32os/gen/vergen.py
2024-02-07 19:33:35 +01:00

9 lines
304 B
Python

import os
with open("xenrom/data/version.inc", "w") as f:
version = os.getenv("NIX_SEMVER", "(unknown version)")
git_sha = os.getenv("NIX_GIT_SHA_SHORT", "(unknown git hash)")
f.write(f'version_str: data.str "{version}" data.8 0\n')
f.write(f'sha_str: data.str "{git_sha}" data.8 0\n')