Commit Graph

1 Commits

Author SHA1 Message Date
Gunnar Beutner e4bbb1d11c
Add build timestamp to the version number (#1145)
I've found this rather useful when repeatedly deploying updated firmware
images to a large number of nodes.

The patch carefully avoids full rebuilds of any "real" source files by
putting the timestamp into a separate .cpp file. It also works around
PlatformIO's build cache that would happily permanently cache the timestamp
file if we were using __DATE__.

The Python script isn't entirely necessary because we could just simply
touch the timestamp file via extra_scripts to force a rebuild. But we'd
need _some_ kind of script anyway and this way we can format the timestamp
more easily than is possible with C++.
2023-12-05 06:02:03 -05:00