Ver código fonte

core: the version contains now the git sha if known

The version numbers displayed by ser -V or sercmd core.version
contain now the git sha.
Andrei Pelinescu-Onciul 16 anos atrás
pai
commit
92721dc19c
2 arquivos alterados com 4 adições e 2 exclusões
  1. 2 1
      core_cmd.c
  2. 2 1
      main.c

+ 2 - 1
core_cmd.c

@@ -28,6 +28,7 @@
 #include <time.h>
 #include <sys/types.h>
 #include <signal.h>
+#include "autover.h"
 #include "mem/mem.h"
 #include "mem/shm_mem.h"
 #include "sr_module.h"
@@ -298,7 +299,7 @@ static const char* core_version_doc[] = {
 
 static void core_version(rpc_t* rpc, void* c)
 {
-	rpc->add(c, "s", SERVER_HDR);
+	rpc->add(c, "s", SERVER_HDR " " REPO_VER );
 }
 
 

+ 2 - 1
main.c

@@ -176,6 +176,7 @@
 #ifdef DEBUG_DMALLOC
 #include <dmalloc.h>
 #endif
+#include "autover.h"
 #include "version.h"
 
 /* define SIG_DEBUG by default */
@@ -186,7 +187,7 @@
 #endif
 
 static char id[]="@(#) $Id$";
-static char* version=SER_FULL_VERSION;
+static char* version=SER_FULL_VERSION " " REPO_VER;
 static char* flags=SER_COMPILE_FLAGS;
 char compiled[]= __TIME__ " " __DATE__ ;