Use git description as the tinc version.
Instead of using a hardcoded version number in configure.ac, this makes tinc use the live version reported by "git describe", queried on-the-fly during the build process and regenerated for every build. This provides several advantages: - Less redundancy: git is now the source of truth for version information, no need to store it in the repository itself. - Simpler release process: just creating a git tag automatically updates the version. No need to change files. - More useful version information: tinc will now display the number of commits since the last tag as well as the commit the binary is built from, following the format described in git-describe(1). Here's an example of tincd --version output: tinc version release-1.1pre10-48-gc149315 (built Jun 29 2014 15:21:10, protocol 17.3) When building directly from a release tag, this would like the following: tinc version release-1.1pre10 (built Jun 29 2014 15:21:10, protocol 17.3) (Note that the format is slightly different - because of the way the tags are named, it says "release-1.1pre10" instead of just "1.1pre10")
This commit is contained in:
parent
aec82bb1c9
commit
e024b7a2c5
7 changed files with 14 additions and 8 deletions
|
|
@ -224,7 +224,7 @@ bool detach(void) {
|
|||
openlogger(identname, use_logfile?LOGMODE_FILE:(do_detach?LOGMODE_SYSLOG:LOGMODE_STDERR));
|
||||
|
||||
logger(DEBUG_ALWAYS, LOG_NOTICE, "tincd %s (%s %s) starting, debug level %d",
|
||||
VERSION, BUILD_DATE, BUILD_TIME, debug_level);
|
||||
BUILD_VERSION, BUILD_DATE, BUILD_TIME, debug_level);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue