software steht so weit.

jetzt build + docker build und testen
This commit is contained in:
br committed 2026-10-02 13:25:34 +02:00
1 parent 42f0c0accb
commit ca6cdcca63
90 files changed
+10298 -480

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
# Baut die Binaries (deploy/build.sh) und lädt sie per rsync auf den statischen
# Webhost (z. B. inst.chmln.de):
#
# TARGET=deploy@webdocker11:/srv/inst/htdocs deploy/publish-static.sh
# STABLE=1 TARGET=… deploy/publish-static.sh # zusätzlich als "stable" markieren
#
# Ablage unter ${TARGET}/sultan/:
# releases/<version>/sultan_linux_{amd64,arm64}
# releases/<version>/SHA256SUMS
# releases/stable → enthält die stabile Version (nur mit STABLE=1)
#
# Ältere Versionen bleiben liegen und damit herunterladbar.
set -euo pipefail
cd "$(dirname "$0")/.."
: "${TARGET:?TARGET setzen, z. B. TARGET=deploy@webdocker11:/srv/inst/htdocs}"
VERSION="${VERSION:-$(git describe --tags --always --dirty)}"
export VERSION
case "$VERSION" in
*-dirty)
echo "Arbeitsverzeichnis hat uncommittete Änderungen (${VERSION}) – erst committen." >&2
exit 1
;;
esac
deploy/build.sh
stage="$(mktemp -d)"
trap 'rm -rf "$stage"' EXIT
mkdir -p "${stage}/sultan/releases/${VERSION}"
cp "dist/${VERSION}"/* "${stage}/sultan/releases/${VERSION}/"
if [ "${STABLE:-0}" = 1 ]; then
echo "$VERSION" > "${stage}/sultan/releases/stable"
fi
chmod -R a+rX "$stage"
# Ohne --delete: bereits veröffentlichte Versionen bleiben erhalten.
rsync -rlv --chmod=Da+rx,Fa+r "${stage}/" "${TARGET}/"
echo "==> veröffentlicht: sultan/releases/${VERSION}"