madison-embedded / gcc-builds

For projects built with the GNU toolchain.
GNU General Public License v3.0
11 stars 8 forks source link

Build: Implement Version String #18

Closed vkottler closed 7 years ago

vkottler commented 7 years ago

Most real-world software products follow X.X.X version number schemes.

We should adopt this, starting from 0.0.0 when this feature is implemented.

The version string should be added to the Post output.

The version string could also be based on the git repository (i.e. commit hash or commit tag).

This could live in the Makefile with something like:

VERSION=0.0.0
GIT_VERSION=$(shell echo something)
DEFINES += -D_VERSION=$(VERSION) -D_GIT_VERSION=$(GIT_VERSION)