Hi all,
How does everyone here go about adding your commit revisions to software logs in a way that is agnostic to the location of the software?
This would be the ideal behavior for me:
1. If you're running on a dev machine, simple use the git command line to grab the current hash, updating a cache of some kind for later use
2. If you're deployed in the wild, try using the git command line, and when it fails, fall back on the cached value
Here's my attempt:
Get the current revision
Update the Git revision
So here's the rub: when you run the update code above, it only works when the "current git revision" VI is nowhere in the call stack; therefore you have the run the update code before running your application to have it work as expected.
That's easy to do in an application builder scenario (just add the update VI to your pre-build actions), but less easy on the dev machine.
Should I just add that same git code to the "current git revision vi"? That might work but doesn't have the best code smell IMO