diff options
author | Alon Bar-Lev | 2012-05-05 09:39:42 +0300 |
---|---|---|
committer | David Sommerseth | 2012-06-01 15:34:49 +0200 |
commit | 7046ff20f93eca1d850df43fe716922e6d105c1c (patch) | |
tree | 4c90548f690560bdacfa8f5a1fcd600b98cf3be2 /src/openvpn | |
parent | f641637a73663dc44d9ef2c3fe82ea557d3cda02 (diff) | |
download | openvpn-7046ff20f93eca1d850df43fe716922e6d105c1c.zip openvpn-7046ff20f93eca1d850df43fe716922e6d105c1c.tar.gz |
build: add git revision to --version output if build from git repository
If source is located at git repository, acquire branch and revision
of head to be printed at --version output.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: David Sommerseth <davids@redhat.com>
Message-Id: 1336199983-9916-1-git-send-email-alon.barlev@gmail.com
URL: http://article.gmane.org/gmane.network.openvpn.devel/6431
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'src/openvpn')
-rw-r--r-- | src/openvpn/options.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/openvpn/options.c b/src/openvpn/options.c index 7769625..4ee2f31 100644 --- a/src/openvpn/options.c +++ b/src/openvpn/options.c @@ -35,6 +35,9 @@ #elif defined(_MSC_VER) #include "config-msvc.h" #endif +#ifdef HAVE_CONFIG_VERSION_H +#include "config-version.h" +#endif #include "syshead.h" @@ -3481,6 +3484,9 @@ usage_version (void) #ifdef CONFIGURE_DEFINES msg (M_INFO|M_NOPREFIX, "Compile time defines: %s", CONFIGURE_DEFINES); #endif +#ifdef CONFIGURE_GIT_REVISION + msg (M_INFO|M_NOPREFIX, "git revision: %s", CONFIGURE_GIT_REVISION); +#endif #endif openvpn_exit (OPENVPN_EXIT_STATUS_USAGE); /* exit point */ } |