chore(repo): Gitea-ready Landwelle repository and welcoming README
Landwelle Gitea CI / Linux x64 container build and smoke test (push) Failing after 41s
Landwelle Gitea CI / JavaScript and deployment-script checks (push) Successful in 40s
Landwelle Gitea source ZIP / source-zip (push) Successful in 38s
Landwelle Gitea CI / Linux x64 production build (push) Successful in 55s
Landwelle Gitea CI / Go tests and vet (push) Successful in 1m9s

Move CI and source ZIP workflow to .gitea, drop obsolete GitHub mirror and retired app artifacts, refresh README and development/deployment documentation, keep migration history and runtime version v1.5.82 unchanged.
This commit is contained in:
Landwelle Server committed 2026-12-03 02:38:31 +01:00
1 parent 672c6c9606
commit 61603e29c4
57 files changed
+316 -4771

No files matched your search

-9
View File
@@ -1,9 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
ASSETS="$ROOT/web/assets"
mkdir -p "$ASSETS"
cp "$1" "$ASSETS/Landwelle-Player-Windows-amd64.exe"
cp "$2" "$ASSETS/Landwelle-Player-Linux-amd64.AppImage"
cp "$3" "$ASSETS/Landwelle-Player-macOS-amd64.zip"
echo "Desktop-Releases wurden in web/assets übernommen."
@@ -1,23 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ ${EUID:-$(id -u)} -ne 0 ]]; then echo "Bitte mit sudo ausführen." >&2; exit 1; fi
SOURCE=${1:-}
if [[ -z "$SOURCE" || ! -f "$SOURCE" ]]; then echo "Aufruf: sudo $0 /pfad/firebase-service-account.json" >&2; exit 1; fi
python3 - "$SOURCE" <<'PY'
import json,sys
with open(sys.argv[1],encoding='utf-8') as f: d=json.load(f)
for key in ('type','project_id','private_key','client_email','token_uri'):
if not d.get(key): raise SystemExit(f'Pflichtfeld fehlt: {key}')
if d['type']!='service_account': raise SystemExit('Keine Firebase Service-Account-Datei')
print('Firebase-Projekt:',d['project_id'])
PY
install -d -o root -g landwelle -m 0750 /etc/landwelle
install -o root -g landwelle -m 0640 "$SOURCE" /etc/landwelle/firebase-service-account.json
ENV=/etc/landwelle/landwelle.env
touch "$ENV"; chown root:landwelle "$ENV"; chmod 0640 "$ENV"
if grep -q '^FIREBASE_SERVICE_ACCOUNT_FILE=' "$ENV"; then
sed -i 's|^FIREBASE_SERVICE_ACCOUNT_FILE=.*|FIREBASE_SERVICE_ACCOUNT_FILE=/etc/landwelle/firebase-service-account.json|' "$ENV"
else
echo 'FIREBASE_SERVICE_ACCOUNT_FILE=/etc/landwelle/firebase-service-account.json' >> "$ENV"
fi
echo "Firebase Service Account sicher installiert."
-81
View File
@@ -1,81 +0,0 @@
#!/usr/bin/env bash
set -Eeuo pipefail
LOCAL_BASE="${LANDWELLE_LOCAL_API_BASE:-http://127.0.0.1:2200}"
PUBLIC_BASE="${LANDWELLE_PUBLIC_API_BASE:-https://api.landwelle.de}"
MUTATING="${LANDWELLE_VERIFY_MUTATING:-0}"
TMP_DIR="$(mktemp -d)"
trap 'rm -rf "$TMP_DIR"' EXIT
json_status() {
local method="$1" url="$2" body="${3:-}" headers="$TMP_DIR/h" output="$TMP_DIR/b" status
if [[ -n "$body" ]]; then
status="$(curl -sS --connect-timeout 5 --max-time 30 -X "$method" -H 'Content-Type: application/json' -D "$headers" -o "$output" -w '%{http_code}' --data "$body" "$url" || true)"
else
status="$(curl -sS --connect-timeout 5 --max-time 30 -X "$method" -D "$headers" -o "$output" -w '%{http_code}' "$url" || true)"
fi
printf '%s' "$status"
}
assert_json_status() {
local label="$1" expected="$2" method="$3" url="$4" body="${5:-}" status
status="$(json_status "$method" "$url" "$body")"
printf '%-34s HTTP %s\n' "$label" "$status"
if [[ "$status" != "$expected" ]]; then
echo " FEHLER: erwartet HTTP $expected"
cat "$TMP_DIR/b" 2>/dev/null || true
echo
return 1
fi
if ! grep -qi 'content-type:.*application/json' "$TMP_DIR/h"; then
echo " FEHLER: Antwort ist nicht application/json"
return 1
fi
}
assert_json_status "lokal /v1/wishes GET" 405 GET "$LOCAL_BASE/v1/wishes"
assert_json_status "öffentlich /v1/wishes GET" 405 GET "$PUBLIC_BASE/v1/wishes"
if [[ "$MUTATING" != "1" ]]; then
cat <<'MSG'
Nur nicht-mutierende Routentests wurden ausgeführt.
Für die im Auftrag verlangten POST-Tests einmal bewusst ausführen:
LANDWELLE_VERIFY_MUTATING=1 ./scripts/verify-app-api-production.sh
Dabei werden zwei Test-Musikwünsche angelegt und anschließend eine temporäre App-Installation registriert und wieder gelöscht.
MSG
exit 0
fi
wish='{"name":"App Test","place":"Visselhövede","artist":"Testinterpret","song":"Testtitel","message":"API-Verifikation aus dem Landwelle-Portal","publish_consent":true}'
assert_json_status "lokaler Wunschbox-POST" 201 POST "$LOCAL_BASE/v1/wishes" "$wish"
assert_json_status "öffentlicher Wunschbox-POST" 201 POST "$PUBLIC_BASE/v1/wishes" "$wish"
installation='{"platform":"android","device_class":"unknown","distribution_channel":"development","app_version":"1.3.2","app_build":"8","os_version":"Android Test","locale":"de-DE","timezone":"Europe/Berlin"}'
status="$(json_status POST "$PUBLIC_BASE/v1/installations" "$installation")"
printf '%-34s HTTP %s\n' "Installation registrieren" "$status"
[[ "$status" == "201" ]] || { cat "$TMP_DIR/b"; exit 1; }
python3 - "$TMP_DIR/b" "$TMP_DIR/installation.env" <<'PY'
import json,sys
p=json.load(open(sys.argv[1]))['data']
with open(sys.argv[2],'w') as f:
f.write('INSTALLATION_ID='+p['installation_id']+'\n')
f.write('INSTALLATION_TOKEN='+p['installation_token']+'\n')
PY
# shellcheck disable=SC1090
source "$TMP_DIR/installation.env"
AUTH="Authorization: Installation $INSTALLATION_TOKEN"
status="$(curl -sS --connect-timeout 5 --max-time 30 -H "$AUTH" -D "$TMP_DIR/h" -o "$TMP_DIR/b" -w '%{http_code}' "$PUBLIC_BASE/v1/installations/$INSTALLATION_ID/topics" || true)"
printf '%-34s HTTP %s\n' "Push-Themen laden" "$status"
[[ "$status" == "200" ]] || { cat "$TMP_DIR/b"; exit 1; }
for topic in breaking-news niedersachsen program; do
grep -q "\"slug\":\"$topic\"" "$TMP_DIR/b" || { echo "Thema $topic fehlt"; exit 1; }
done
status="$(curl -sS --connect-timeout 5 --max-time 30 -X DELETE -H "$AUTH" -o /dev/null -w '%{http_code}' "$PUBLIC_BASE/v1/installations/$INSTALLATION_ID" || true)"
printf '%-34s HTTP %s\n' "Testinstallation löschen" "$status"
[[ "$status" == "204" ]] || exit 1
echo
echo "Landwelle Wunschbox-/Installations-API ist lokal und öffentlich erreichbar."
-48
View File
@@ -1,48 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
ENABLE=false
if [[ ${1:-} == "--enable" ]]; then
ENABLE=true
elif [[ $# -gt 0 ]]; then
echo "Aufruf: $0 [--enable]" >&2
exit 2
fi
CREDENTIAL_FILE="${FIREBASE_SERVICE_ACCOUNT_FILE:-/etc/landwelle/firebase-service-account.json}"
if [[ "$CREDENTIAL_FILE" != /* ]]; then
echo "FIREBASE_SERVICE_ACCOUNT_FILE muss absolut sein." >&2
exit 1
fi
if [[ ! -r "$CREDENTIAL_FILE" ]]; then
echo "Firebase-Service-Account-Datei ist nicht lesbar." >&2
exit 1
fi
if ! command -v gcloud >/dev/null 2>&1; then
echo "gcloud fehlt. Prüfe die Firebase Cloud Messaging API in der Firebase-/Google-Cloud-Konsole." >&2
exit 1
fi
PROJECT_ID="$(python3 - "$CREDENTIAL_FILE" <<'PY'
import json, sys
with open(sys.argv[1], encoding='utf-8') as handle:
payload = json.load(handle)
project = str(payload.get('project_id', '')).strip()
if not project:
raise SystemExit('project_id fehlt')
print(project)
PY
)"
if $ENABLE; then
gcloud services enable fcm.googleapis.com --project "$PROJECT_ID"
fi
ENABLED="$(gcloud services list --enabled --project "$PROJECT_ID" --filter='config.name=fcm.googleapis.com' --format='value(config.name)')"
if [[ "$ENABLED" != "fcm.googleapis.com" ]]; then
echo "Firebase Cloud Messaging API ist für Projekt $PROJECT_ID nicht als aktiviert erkennbar." >&2
echo "Aktivieren: $0 --enable" >&2
exit 1
fi
echo "Firebase Cloud Messaging API ist aktiviert: project=$PROJECT_ID service=fcm.googleapis.com"