chore(portal): add deploy helper for untagged HEAD
Verify / verify (push) Canceled after 0s

This commit is contained in:
2026-09-03 08:40:49 +02:00
parent 9dbbdb5ed2
commit cd54847af8
2 changed files with 34 additions and 1 deletions
+11 -1
View File
@@ -99,7 +99,17 @@ Deploy a fresh clone with:
```sh ```sh
git clone https://git.add-ideas.de/lotobo/toolbox-portal.git git clone https://git.add-ideas.de/lotobo/toolbox-portal.git
cd toolbox-portal cd toolbox-portal
docker compose up -d --build ./scripts/deploy-update.sh
```
If you prefer the inline command:
```sh
git fetch origin --tags && \
git pull --ff-only origin main && \
{ TAG="$(git describe --tags --exact-match 2>/dev/null || git describe --tags --abbrev=0 2>/dev/null || true)"; \
if [ -n "$TAG" ]; then echo "$TAG"; else echo "warning: no matching tags found"; fi; } && \
docker compose up -d --build && \
docker compose ps docker compose ps
``` ```
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
cd "${PROJECT_DIR}"
git fetch origin --tags
git pull --ff-only origin main
if ! TAG="$(git describe --tags --exact-match 2>/dev/null)"; then
TAG="$(git describe --tags --abbrev=0 2>/dev/null || true)"
if [ -z "${TAG}" ]; then
echo "warning: current commit is untagged and no tagged ancestor was found"
else
echo "warning: current commit is untagged; nearest tag is ${TAG}"
fi
else
echo "tagged: ${TAG}"
fi
docker compose up -d --build
docker compose ps