I’m trying to use the Projucer “Post Export Shell Command” to write the current git hash to a file in the form:
#define GIT_COMMIT_ID "3c5f09ab"
In bash no problemo, but cmd.exe is giving me headaches. I managed to execute it in PowerShell, but the Projucer seems to be using cmd.exe only. The PowerShell command would be
Ok, but then I’m running into big troubles with escape characters. My original powershell command had an quote-escape in it, which I would need to double escape in this case. Even when ommiting that (I can fix it in C++ by writing a hex instead of a string), I’m running into troubles. This command does what I want when executed in the shell itself
I want to display the commit hash along with the version inside the “about” section of my plugin. Therefore I need to somehow incorporate it into code. The reason I want to do this is so testers can report which exact commit they’re on, in case they’re using a nightly build.