Add git tag / SHA1 as a build string

Every build from commit 20271c6 (Apr 10 2013) is versioned as 1.6.0.
Add a build version after the version number
Digital Speech Decoder 1.6.0 (build:v1.6.0-20-g16110bd)

The build string uses git describe to list the tag closest to head,
and the number of commits past that tag, the a litteral g and ending
with the current SHA1
This commit is contained in:
Dylan Reinhold
2013-12-18 23:07:12 -08:00
parent 271a7e459a
commit 2f6214fe72
6 changed files with 179 additions and 1 deletions

View File

@@ -24,6 +24,7 @@
#include "nxdn_const.h"
#include "dmr_const.h"
#include "provoice_const.h"
#include "git_ver.h"
int
comp (const void *a, const void *b)
@@ -340,7 +341,7 @@ main (int argc, char **argv)
char versionstr[25];
mbe_printVersion (versionstr);
printf ("Digital Speech Decoder 1.7.0-dev\n");
printf ("Digital Speech Decoder 1.7.0-dev (build:%s)\n", GIT_TAG);
printf ("mbelib version %s\n", versionstr);
initOpts (&opts);