Pazpar2 command 'info' also shows Git SHA1 ID.
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 5 May 2009 11:00:43 +0000 (13:00 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 5 May 2009 11:00:43 +0000 (13:00 +0200)
src/http_command.c

index 1a38a82..340e7c0 100644 (file)
@@ -855,7 +855,11 @@ static void cmd_info(struct http_channel *c)
     wrbuf_rewind(c->wrbuf);
     wrbuf_puts(c->wrbuf, "<info>\n");
     wrbuf_puts(c->wrbuf, " <version>\n");
-    wrbuf_puts(c->wrbuf, "<pazpar2>");
+    wrbuf_puts(c->wrbuf, "<pazpar2");
+#ifdef PAZPAR2_VERSION_SHA1
+    wrbuf_printf(c->wrbuf, " sha1=\"%s\"", PAZPAR2_VERSION_SHA1);
+#endif
+    wrbuf_puts(c->wrbuf, ">");
     wrbuf_xmlputs(c->wrbuf, VERSION);
     wrbuf_puts(c->wrbuf, "</pazpar2>");