commit 71ab65b7f3f6ad715d0cfc4d37245fa39f2ffac0
parent 9c975b780060afbc023a433ef53b8726f3d8420b
Author: Florian Dold <dold@taler.net>
Date: Tue, 8 Sep 2026 22:11:35 +0200
CI packaging: derive versions from the highest SemVer tag
Select stable and dev.K tags across the full repository, ignoring build
metadata. Use next-patch -0.N and dev.K.N snapshot versions with
matching Debian ordering, and determine exact releases by commit
identity.
Fetch tags for the scheduled commit without limiting history. Stop
packaging when version generation fails or returns an empty version.
Use the root version entry point instead of the nonexistent job path.
Diffstat:
4 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/contrib/ci/Containerfile b/contrib/ci/Containerfile
@@ -14,11 +14,20 @@ RUN apt-get update -yq && \
man \
make \
postgresql \
- debhelper \
build-essential \
- git-buildpackage && \
- # Install rustup toolchain
- rustup default stable
+ git-buildpackage \
+ unzip \
+ po-debconf \
+ build-essential \
+ debhelper-compat \
+ devscripts \
+ curl
+
+# Install dependencies provided by other Taler repositories.
+RUN curl -sSL https://taler.net/taler-systems.gpg \
+ -o /etc/apt/keyrings/taler-systems.gpg && \
+ echo 'deb [signed-by=/etc/apt/keyrings/taler-systems.gpg] https://deb.taler.net/apt/debian trixie-testing main' \
+ > /etc/apt/sources.list.d/taler.list
WORKDIR /workdir
diff --git a/contrib/ci/jobs/4-deb-amd64/job.sh b/contrib/ci/jobs/4-deb-amd64/job.sh
@@ -6,7 +6,9 @@ apt-get update -yq
apt-get upgrade -yq
# Build package
-export VERSION="$(./contrib/ci/version.sh)"
+VERSION="$(./contrib/ci/version.sh)"
+export VERSION
+: "${VERSION:?version generation returned an empty version}"
echo "Building package version ${VERSION}"
EMAIL=none gbp dch --dch-opt=-b --ignore-branch --debian-tag="%(version)s" --git-author --new-version="${VERSION}"
make deb
diff --git a/contrib/ci/version.sh b/contrib/ci/jobs/4-deb/version.sh
diff --git a/contrib/ci/version.sh b/contrib/ci/version.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# This file is in the public domain.
-# Compatibility entry point, also usable in generated job directories.
+# Print the Debian CI version; diagnostics go to stderr.
set -eu
-repo_dir=$(git rev-parse --show-toplevel)
-exec "$repo_dir/contrib/ci/version.sh" "$@"
+script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
+exec python3 "$script_dir/debian-version.py" "$@"