How would I get the platformIO build to generate and insert a git short hash of the current directory? I want to be able to embed this short hash in the build so we can uniquely identify each binary.
Thanks, I checked out that link, but couldn’t find what I wanted. What is the actual env. var. or command name to get a git short hash id of the current project?
You have a few options how to achieve that:
- Override Redirecting...
[platformio] envs_dir = custom_env_dir_name
- Using pre:extra scripting override
$PROGNAME
variable.