Is there macro or equivalent that can be used to determine the build number? Would like to include this in the version numbering.
@kennethlimcp thanks for this, but it is not what I was after.
Am wanting to automatically retrieve the build number of the user application that is being written, not the operating kernel (Particle firmware).
For example, the first time you compile the code, the build number will be one, the next compile it will be two and so on.
Hope this makes sense!
I don’t think the build farm keeps track of your build history - which would be a requirement to maintain a build number.
But you could use
__TIMESTAMP__ to keep track of the chronology
(With some luck the build farm may even support
BUILD_SOURCE_EPOCH for a sortable timestamp)
@scruffr, excellent solution!
Case closed with thanks!