A colleague and I have been taking turns debating/discussing the issues/merits of integrating a version derived from the current git repository into our code whenever it builds.
We think the merits include:
- No need to worry about human error in updating a version number
- Traceability between what we find in a device and the source code it was derived from
The issues that have arisen (for us) include:
- IDE derived build systems (e.g. MPLABX) can make it hard to figure out where to put these kinds of hooks in (and it can end up pretty cheesy in the end)
- More work to actually integrate this into the build scripts/makefiles
- Coupling to a particular build approach (e.g. what if one person builds with XCode and the other MPLABX) may create downstream surprises
So we're curious where others have landed on this debate. It's really easy for the discussion to become anecdotal. There are lots of people out there who are insistent on end-to-end automation, hang the amount of up front work and coupling it creates. And there are a lot of others on the other side of the debate, who just do the easiest thing that works and live with the risks.
Is there a reasoned answer to which side is best to land on?