From 93722641741d5fe7106b9654493b2d498dbbaa93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=B6rdle=20Bot?= Date: Sun, 14 Dec 2025 14:28:39 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20Nur=20erreichbare=20Git-Tags=20f=C3=BCr?= =?UTF-8?q?=20Version=20verwenden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7bef078..3f59f84 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,12 +24,12 @@ COPY --from=deps /app/node_modules ./node_modules COPY . . # Extract version: use build arg if provided, otherwise get from git, fallback to package.json +# Only use tags that are reachable from the current commit to ensure version matches the code RUN if [ -n "$APP_VERSION" ]; then \ echo "$APP_VERSION" > /tmp/version.txt; \ else \ (git describe --tags --exact-match 2>/dev/null || \ git describe --tags --abbrev=0 2>/dev/null || \ - git tag --sort=-version:refname | head -1 2>/dev/null || \ (grep -o '"version": "[^"]*"' package.json 2>/dev/null | cut -d'"' -f4 | sed 's/^/v/') || \ echo "dev") > /tmp/version.txt; \ fi && \