Files
roro9stack/scripts/version.py
T
twislaandClaude Opus 5.5 fd4afd54da Scaffold PlatformIO project with Docker-based build, test and flash
- pioarduino platform 55.03.312 (Arduino-ESP32 3.3.x / ESP-IDF 5.5),
  board m5stack-stamps3, M5Cardputer 1.1.1
- native env with Unity for host-side tests
- scripts/ci.sh and scripts/flash.sh run PlatformIO in a container
- version injected from git describe
- boot stub shows name, version and pressed keys
- GPL-3.0 license

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
2026-10-01 18:35:08 +02:00

14 lines
403 B
Python

# Injects the firmware version from `git describe` (semver tags like v0.1.0).
import subprocess
Import("env") # noqa: F821 (provided by PlatformIO)
try:
version = subprocess.check_output(
["git", "describe", "--tags", "--always", "--dirty"], text=True
).strip()
except Exception:
version = "unknown"
env.Append(CPPDEFINES=[("RORO_VERSION", '\\"%s\\"' % version)]) # noqa: F821