This commit is contained in:
@@ -99,7 +99,17 @@ Deploy a fresh clone with:
|
||||
```sh
|
||||
git clone https://git.add-ideas.de/lotobo/toolbox-portal.git
|
||||
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
|
||||
```
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user