* feat(x64): add Linux amd64 builds, deploy scripts and regression tests * docs(x64): update release, operations and architecture references * docs(x64): add migration, cutover and rollback runbook * ci(x64): verify Docker runtime and protect container build context
27 lines
723 B
Bash
Executable File
27 lines
723 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$PROJECT_DIR"
|
|
|
|
if [[ -z "${MIGRATOR:-}" ]]; then
|
|
case "$(uname -m)" in
|
|
x86_64) TARGET_ARCH="amd64" ;;
|
|
aarch64|arm64) TARGET_ARCH="arm64" ;;
|
|
*) echo "Nicht unterstützte CPU-Architektur: $(uname -m)" >&2; exit 1 ;;
|
|
esac
|
|
MIGRATOR="$PROJECT_DIR/dist/landwelle-migrate-linux-$TARGET_ARCH"
|
|
fi
|
|
ENV_FILE="${ENV_FILE:-/etc/landwelle/landwelle.env}"
|
|
|
|
if [[ ! -x "$MIGRATOR" ]]; then
|
|
echo "Migrator nicht gefunden oder nicht ausführbar: $MIGRATOR" >&2
|
|
exit 1
|
|
fi
|
|
|
|
exec "$MIGRATOR" \
|
|
--env-file "$ENV_FILE" \
|
|
--dir "$PROJECT_DIR/migrations" \
|
|
--archive-dir "$PROJECT_DIR/migrations/applied" \
|
|
"$@"
|