exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit b53826255873e3b9381f7cdec5e6613cff4c0e51
parent 55b7ddabb83475cc954a0ffa9f141d2b6d0abaf8
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Fri, 22 May 2026 11:06:24 +0200

Fix #11423

Diffstat:
M.gitignore | 1+
Mmeson-dist-script | 2+-
Mmeson.build | 5++---
Ascripts/get_version.sh | 33+++++++++++++++++++++++++++++++++
Msrc/auditor/taler-auditor-httpd.c | 2+-
Msrc/auditor/taler-auditor-sync.c | 2+-
Msrc/benchmark/taler-bank-benchmark.c | 2+-
Msrc/benchmark/taler-exchange-benchmark.c | 2+-
Msrc/exchange/taler-exchange-drain.c | 2+-
Msrc/exchange/taler-exchange-sanctionscheck.c | 2+-
Msrc/exchange/taler-exchange-transfer.c | 2+-
Msrc/exchange/taler-exchange-wirewatch.c | 2+-
Msrc/util/os_installation.c | 6+++---
13 files changed, 48 insertions(+), 15 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -7,6 +7,7 @@ *.mo *.blg *.bbl +.version .dirstamp m4/*.m4 doc/coverage/ diff --git a/meson-dist-script b/meson-dist-script @@ -1,3 +1,3 @@ #!/bin/sh -./scripts/doxygen.meson.sh +cp $MESON_SOURCE_ROOT/.version $MESON_DIST_ROOT diff --git a/meson.build b/meson.build @@ -3,7 +3,7 @@ project( 'c', license: 'AGPLv3', meson_version: '>=1.1.0', - version: '1.5.6', + version: run_command('sh', 'scripts/get_version.sh', check: true).stdout().strip(), ) cc = meson.get_compiler('c') @@ -343,7 +343,6 @@ if not get_option('only-doc') private_config.set_quoted('PACKAGE_VERSION', meson.project_version()) # Compatibility. Used in source. private_config.set_quoted('VERSION', meson.project_version()) - private_config.set_quoted('VCS_VERSION', 'mesonbuild') private_config.set_quoted('PACKAGE_BUGREPORT', 'taler@gnu.org') configure_file(output: 'taler_config.h', configuration: private_config) configuration_inc = include_directories('.') @@ -390,4 +389,4 @@ run_target( command: 'scripts/doxygen.meson.sh', env: {'PACKAGE_VERSION': meson.project_version()}, ) -#meson.add_dist_script('meson-dist-script') +meson.add_dist_script('meson-dist-script') diff --git a/scripts/get_version.sh b/scripts/get_version.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# Gets the version number from git, or from the contents of .version +VERSION= +if test -f ".version"; then + VERSION=$(cat .version) +fi +if [ -e ./.git ]; then + # With sparse checkouts, we have a .git dir but possibly no tags + gitver=$(git describe --tags 2>/dev/null || echo no-git-version) + if test "$gitver" != "no-git-version"; then + VERSION=${gitver#v} + echo "$VERSION" > .version + fi +fi +if test "x$VERSION" = "x"; then + VERSION="unknown" +fi +case $1 in +"--major") + echo "$VERSION" | sed 's/\(^[0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/g' + ;; +"--minor") + echo "$VERSION" | sed 's/\(^[0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/g' + ;; +"--micro") + echo "$VERSION" | sed 's/\(^[0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/g' + ;; +"--git") + echo "$VERSION" | sed 's/\(^[0-9]*\)\.\([0-9]*\)\.\([0-9]*\)\(.*\)/\4/g' + ;; +*) + echo "$VERSION" +esac diff --git a/src/auditor/taler-auditor-httpd.c b/src/auditor/taler-auditor-httpd.c @@ -1453,7 +1453,7 @@ main (int argc, GNUNET_GETOPT_option_help ( TALER_AUDITOR_project_data (), "HTTP server providing a RESTful API to access a Taler auditor"), - GNUNET_GETOPT_option_version (VERSION "-" VCS_VERSION), + GNUNET_GETOPT_option_version (VERSION), GNUNET_GETOPT_OPTION_END }; int ret; diff --git a/src/auditor/taler-auditor-sync.c b/src/auditor/taler-auditor-sync.c @@ -790,7 +790,7 @@ main (int argc, gettext_noop ( "terminate as soon as the databases are synchronized"), &exit_if_synced), - GNUNET_GETOPT_option_version (VERSION "-" VCS_VERSION), + GNUNET_GETOPT_option_version (VERSION), GNUNET_GETOPT_option_loglevel (&level), GNUNET_GETOPT_OPTION_END }; diff --git a/src/benchmark/taler-bank-benchmark.c b/src/benchmark/taler-bank-benchmark.c @@ -483,7 +483,7 @@ main (int argc, "SECTION", "use exchange bank account configuration from the given SECTION", &exchange_bank_section)), - GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION), + GNUNET_GETOPT_option_version (PACKAGE_VERSION), GNUNET_GETOPT_option_verbose (&verbose), GNUNET_GETOPT_option_uint ('w', "wirewatch", diff --git a/src/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c @@ -476,7 +476,7 @@ main (int argc, GNUNET_GETOPT_option_cfgfile ( &cfg_filename)), GNUNET_GETOPT_option_version ( - PACKAGE_VERSION " " VCS_VERSION), + PACKAGE_VERSION), GNUNET_GETOPT_option_flag ( 'f', "fakebank", diff --git a/src/exchange/taler-exchange-drain.c b/src/exchange/taler-exchange-drain.c @@ -412,7 +412,7 @@ main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_option_version (VERSION "-" VCS_VERSION), + GNUNET_GETOPT_option_version (VERSION), GNUNET_GETOPT_OPTION_END }; enum GNUNET_GenericReturnValue ret; diff --git a/src/exchange/taler-exchange-sanctionscheck.c b/src/exchange/taler-exchange-sanctionscheck.c @@ -857,7 +857,7 @@ main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_option_version (VERSION "-" VCS_VERSION), + GNUNET_GETOPT_option_version (VERSION), GNUNET_GETOPT_option_flag ('n', "norun", "do not actually start a scan (to be used to only reset without starting a scan)", diff --git a/src/exchange/taler-exchange-transfer.c b/src/exchange/taler-exchange-transfer.c @@ -904,7 +904,7 @@ main (int argc, "COUNT", "Plan work load with up to COUNT worker processes (default: 16)", &max_workers), - GNUNET_GETOPT_option_version (VERSION "-" VCS_VERSION), + GNUNET_GETOPT_option_version (VERSION), GNUNET_GETOPT_OPTION_END }; enum GNUNET_GenericReturnValue ret; diff --git a/src/exchange/taler-exchange-wirewatch.c b/src/exchange/taler-exchange-wirewatch.c @@ -1134,7 +1134,7 @@ main (int argc, "COUNT", "Plan work load with up to COUNT worker processes (default: 16)", &max_workers), - GNUNET_GETOPT_option_version (VERSION "-" VCS_VERSION), + GNUNET_GETOPT_option_version (VERSION), GNUNET_GETOPT_OPTION_END }; enum GNUNET_GenericReturnValue ret; diff --git a/src/util/os_installation.c b/src/util/os_installation.c @@ -40,7 +40,7 @@ static const struct GNUNET_OS_ProjectData exchange_pd = { .homepage = "http://www.gnu.org/s/taler/", .config_file = "taler-exchange.conf", .user_config_file = "~/.config/taler-exchange.conf", - .version = PACKAGE_VERSION "-" VCS_VERSION, + .version = PACKAGE_VERSION, .is_gnu = 1, .gettext_domain = "taler", .gettext_path = NULL, @@ -69,7 +69,7 @@ static const struct GNUNET_OS_ProjectData auditor_pd = { .homepage = "http://www.gnu.org/s/taler/", .config_file = "taler-auditor.conf", .user_config_file = "~/.config/taler-auditor.conf", - .version = PACKAGE_VERSION "-" VCS_VERSION, + .version = PACKAGE_VERSION, .is_gnu = 1, .gettext_domain = "taler", .gettext_path = NULL, @@ -98,7 +98,7 @@ static const struct GNUNET_OS_ProjectData fakebank_pd = { .homepage = "http://www.gnu.org/s/taler/", .config_file = "taler-fakebank.conf", .user_config_file = "~/.config/taler-fakebank.conf", - .version = PACKAGE_VERSION "-" VCS_VERSION, + .version = PACKAGE_VERSION, .is_gnu = 1, .gettext_domain = "taler", .gettext_path = NULL,