Fix: Tags nach shallow clone explizit fetchen für Version-Datei

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
boban 2026-04-24 13:20:19 +02:00
parent 01e7db589a
commit 814776d1ff
1 changed files with 1 additions and 0 deletions

View File

@ -753,6 +753,7 @@ git config --global --add safe.directory "${APP_DIR}" || true
# ===== Version-Datei schreiben =====
mkdir -p /var/lib/mailwolt
sudo -u "$APP_USER" -H bash -lc "git -C ${APP_DIR} fetch --tags --depth=1 origin 2>/dev/null || true"
GIT_TAG="$(sudo -u "$APP_USER" -H bash -lc "git -C ${APP_DIR} describe --tags --abbrev=0 2>/dev/null || echo ''")"
if [ -n "$GIT_TAG" ]; then
echo "${GIT_TAG#v}" > /var/lib/mailwolt/version