From e22dcecc66b9915b6e1aafbcdc0e72e91248681c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 9 Nov 2019 14:09:15 +0100 Subject: add version --- src/backend/taler-merchant-httpd_config.c | 23 +++++++++++++++++++++-- src/lib/test_merchant_api.c | 3 ++- 2 files changed, 23 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/backend/taler-merchant-httpd_config.c b/src/backend/taler-merchant-httpd_config.c index 8af84e91..35b7657b 100644 --- a/src/backend/taler-merchant-httpd_config.c +++ b/src/backend/taler-merchant-httpd_config.c @@ -31,6 +31,24 @@ #include "taler-merchant-httpd_tip-reserve-helper.h" +/** + * 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. * @@ -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 index 165a9d71..56cbb207 100644 --- 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, -- cgit v1.2.3