Browse Source

lib-imap: Add revision field for ID command

Returns short commit ID of the revision dovecot was built from.
pull/114/head
Siavash Tavakoli 6 years ago
committed by timo.sirainen
parent
commit
c9edfc67c6
  1. 3
      src/lib-imap/imap-id.c
  2. 3
      update-version.sh

3
src/lib-imap/imap-id.c

@ -7,6 +7,7 @@
#include "imap-parser.h"
#include "imap-quote.h"
#include "imap-id.h"
#include "dovecot-version.h"
#ifdef HAVE_SYS_UTSNAME_H
# include <sys/utsname.h>
@ -40,6 +41,8 @@ static const char *imap_id_get_default(const char *key)
return PACKAGE_NAME;
if (strcasecmp(key, "version") == 0)
return PACKAGE_VERSION;
if (strcasecmp(key, "revision") == 0)
return DOVECOT_REVISION;
if (strcasecmp(key, "support-url") == 0)
return PACKAGE_WEBPAGE;
if (strcasecmp(key, "support-email") == 0)

3
update-version.sh

@ -45,7 +45,8 @@ if true; then
#ifndef DOVECOT_VERSION_H
#define DOVECOT_VERSION_H
#define DOVECOT_VERSION_FULL VERSION" (${GITID})"
#define DOVECOT_REVISION "${GITID}"
#define DOVECOT_VERSION_FULL VERSION" ("DOVECOT_REVISION")"
#define DOVECOT_BUILD_INFO ${DOVECOT_BUILD_INFO}
#endif /* DOVECOT_VERSION_H */

Loading…
Cancel
Save