commit e22dcecc66b9915b6e1aafbcdc0e72e91248681c
parent 7ceb24c57d843a5ba7aac4b6cfe5e2064dd16758
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 9 Nov 2019 14:09:15 +0100
add version
Diffstat:
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_config.c b/src/backend/taler-merchant-httpd_config.c
@@ -32,6 +32,24 @@
/**
+ * Taler protocol version in the format CURRENT:REVISION:AGE
+ * as used by GNU libtool. See
+ * https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
+ *
+ * Please be very careful when updating and follow
+ * https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info
+ * precisely. Note that this version has NOTHING to do with the
+ * release version, and the format is NOT the same that semantic
+ * versioning uses either.
+ *
+ * When changing this version, you likely want to also update
+ * #TALER_PROTOCOL_CURRENT and #TALER_PROTOCOL_AGE in
+ * TBD.c! // FIXME: update comment once libtalermerchant looks at version!
+ */
+#define TALER_PROTOCOL_VERSION "0:0:0"
+
+
+/**
* Handle a "/config" request.
*
* @param rh context of the handler
@@ -52,8 +70,9 @@ MH_handler_config (struct TMH_RequestHandler *rh,
{
return TMH_RESPONSE_reply_json_pack (connection,
MHD_HTTP_OK,
- "{s:s}",
- "currency", TMH_currency);
+ "{s:s, s:s}",
+ "currency", TMH_currency,
+ "version", TALER_PROTOCOL_VERSION);
}
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
@@ -1091,7 +1091,8 @@ main (int argc,
case GNUNET_OK:
if (NULL == (merchantd =
- TALER_TESTING_run_merchant (CONFIG_FILE, merchant_url)))
+ TALER_TESTING_run_merchant (CONFIG_FILE,
+ merchant_url)))
return 1;
ret = TALER_TESTING_setup_with_exchange (&run,