mirror of
https://github.com/torlando-tech/pyxis.git
synced 2026-08-03 17:30:14 +00:00
16 lines
427 B
Python
16 lines
427 B
Python
Import("env")
|
|
import os
|
|
import subprocess
|
|
|
|
version = os.environ.get("PYXIS_VERSION_OVERRIDE")
|
|
if not version:
|
|
try:
|
|
version = subprocess.check_output(
|
|
["git", "describe", "--tags", "--always", "--dirty"],
|
|
stderr=subprocess.DEVNULL
|
|
).decode().strip().lstrip("v")
|
|
except Exception:
|
|
version = "dev"
|
|
|
|
env.Append(CPPDEFINES=[("FIRMWARE_VERSION", env.StringifyMacro(version))])
|