challenger

OAuth 2.0-based authentication service that validates user can receive messages at a certain address
Log | Files | Refs | Submodules | README | LICENSE

commit 3814f5fcbdeccde198dc4d04b645526207fe25e9
parent cdfc8642100f01e05dc13e55360b6f225cd9048b
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Fri, 22 May 2026 11:20:06 +0200

Fix #11423

Diffstat:
M.gitignore | 1+
Mflake.nix | 14+++++++++++++-
Ameson-dist-script | 3+++
Mmeson.build | 5++---
Ascripts/get_version.sh | 33+++++++++++++++++++++++++++++++++
5 files changed, 52 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -11,3 +11,4 @@ build/ uncrustify.cfg config.status Makefile +.version diff --git a/flake.nix b/flake.nix @@ -117,7 +117,19 @@ echo "taler-mdb environment loaded." export CC=gcc export CFLAGS="-O" - ''; + mkdir -p default + export PGHOST=localhost + export PGPORT=5432 + export PGUSER=$USER + export PGDATABASE=talercheck + export PGDATA="$PWD/default/.pg" + echo $PWD + [ ! -d $PGDATA ] && PGHOST="$PGDATA" pg_ctl initdb -o "-U $PGUSER" + + pg_ctl -o "-p $PGPORT -k $PGDATA" start && createdb talercheck && createdb challengercheck && { + trap 'pg_ctl stop && rm -r $PGDATA' EXIT + } + ''; }; }); }; diff --git a/meson-dist-script b/meson-dist-script @@ -0,0 +1,3 @@ +#!/bin/sh + +cp $MESON_SOURCE_ROOT/.version $MESON_DIST_ROOT diff --git a/meson.build b/meson.build @@ -3,7 +3,7 @@ 'c', license: 'AGPLv3', meson_version: '>=1.1.0', - version: '1.5.1', + version: run_command('sh', 'scripts/get_version.sh', check: true).stdout().strip(), ) cc = meson.get_compiler('c') @@ -245,7 +245,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: 'challenger_config.h', configuration: private_config) configuration_inc = include_directories('.') @@ -280,5 +279,5 @@ 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