mirror of
https://github.com/torlando-tech/pyxis.git
synced 2026-03-30 05:39:53 +00:00
Add version.py PlatformIO pre-build script that reads version from `git describe --tags --always` and defines FIRMWARE_VERSION as a build flag. Local builds without tags fall back to "dev". Also rename FIRMWARE_NAME from "microReticulum" to "Pyxis". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
13 lines
311 B
Python
13 lines
311 B
Python
Import("env")
|
|
import subprocess
|
|
|
|
try:
|
|
version = subprocess.check_output(
|
|
["git", "describe", "--tags", "--always"],
|
|
stderr=subprocess.DEVNULL
|
|
).decode().strip().lstrip("v")
|
|
except Exception:
|
|
version = "dev"
|
|
|
|
env.Append(CPPDEFINES=[("FIRMWARE_VERSION", env.StringifyMacro(version))])
|