flare-game icon indicating copy to clipboard operation
flare-game copied to clipboard

Add git hash when building, and log it at flare start-up?

Open vgaming opened this issue 6 years ago • 2 comments

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?

vgaming avatar Mar 04 '18 11:03 vgaming

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.

vgaming avatar Mar 04 '18 11:03 vgaming

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.

AndyMender avatar Oct 05 '18 19:10 AndyMender