v1.11.1-3-ABCD that says that the firmware you are running is based on v1.11.1 but has 3 additional commits and is at the commit ABCD
git describe:
This command is highly useful for generating version strings based on the most recent tag reachable from a commit.
git describe --tags --always --dirty can produce output like v1.0.0-1-gABCDEF (tag, number of commits since tag, abbreviated commit hash) or v1.0.0-dirty if there are uncommitted changes.
I’m super open to this, but it might be beyond my git-fu abilities to actually implement it
this issue isn’t how to get git to give you the information, the issue is how to
make it something that gets populated at compile time from a shell command
rather than be hard-coded in the file.
it could be an external command that gets run and writes the value to a file
that is then used during the compile
or it could be a macro that populates the value based on running an external
command.
It looks like it already generated a pull request!
Let me know if it’s working the way that you would expect it to.
You can even have it build automatically by commenting “@MaslowBot please build” on the pull request and it will run the build and attach it to the pull request.
If you don’t like the way that it is working you can say “@MaslowBot please fix this to run automatically when build-release.py is called” or something like that and it should update the pull request with your suggestions