flare-game
flare-game copied to clipboard
Add git hash when building, and log it at flare start-up?
Is it possible for flare to log a line like that when starting up?:
INFO: Flare 0.95.19-ba4d009 (Linux)
As far as I understand, it would require in-lining the git hash somewhere at build time. I have no experience with writing make/cmake files, unfortunately, so IDK how it should be done. This seems to be a good instruction: https://stackoverflow.com/a/21028226/1091436 but IDK for sure.
Thoughts?
BTW, if you paste such a log in flare-engine repo, github will automatically highlight the 7 letters of the commit and make it an http reference.
As far as I know, pygit2
gives access to the .git tree attributes (including a commit hash), however the engine version would have to be extracted from the engine module directly if it's exposed.