Use git revision in development strings

This commit is contained in:
James Booth
2013-09-17 01:28:35 +01:00
parent 90d5df9ef7
commit ee8ff948bf
4 changed files with 42 additions and 1 deletions

View File

@@ -22,6 +22,10 @@
#include "config.h"
#ifdef HAVE_GIT_VERSION
#include "gitversion.c"
#endif
#include <stdlib.h>
#include <string.h>
@@ -238,7 +242,14 @@ caps_create_query_response_stanza(xmpp_ctx_t * const ctx)
GString *name_str = g_string_new("Profanity ");
g_string_append(name_str, PACKAGE_VERSION);
if (strcmp(PACKAGE_STATUS, "development") == 0) {
#ifdef HAVE_GIT_VERSION
g_string_append(name_str, "dev.");
g_string_append(name_str, PROF_GIT_BRANCH);
g_string_append(name_str, ".");
g_string_append(name_str, PROF_GIT_REVISION);
#else
g_string_append(name_str, "dev");
#endif
}
xmpp_stanza_set_attribute(identity, "name", name_str->str);