update
CI / test (push) Successful in 1m4s
Release rolling / release (push) Successful in 7m22s

This commit is contained in:
Raven Scott
2026-07-18 16:47:48 -04:00
parent d56c6757a5
commit 5f82722df8
3 changed files with 50 additions and 9 deletions
+44 -6
View File
@@ -108,17 +108,48 @@ stage_server() {
log "staged $archive"
}
find_client_dir() {
local host="$1"
# Prefer stable lowercase out/peardata-<host> (forge packagerConfig.name).
# Also accept legacy PearData-<host> / productName variants from older builds.
local candidates=(
"$ROOT/out/peardata-$host"
"$ROOT/out/PearData-$host"
"$ROOT/out/peardata-client-$host"
)
local d
for d in "${candidates[@]}"; do
if [[ -d "$d" ]]; then
echo "$d"
return 0
fi
done
# Last resort: any out/*-<host> Electron package (exclude Bare server dirs)
while IFS= read -r d; do
[[ -z "$d" ]] && continue
case "$(basename "$d")" in
peardata-server-*) continue ;;
esac
echo "$d"
return 0
done < <(find "$ROOT/out" -maxdepth 1 -type d -name "*-$host" 2>/dev/null | sort)
return 1
}
stage_client() {
local host="$1"
local dir="$ROOT/out/peardata-$host"
if [[ ! -d "$dir" ]]; then
log "WARN: missing client dir $dir"
local dir
if ! dir="$(find_client_dir "$host")"; then
log "WARN: missing client dir for $host (looked under out/*-$host)"
ls -la "$ROOT/out" 2>/dev/null || true
return 1
fi
local leaf
leaf="$(basename "$dir")"
local archive="peardata-client-${VERSION}-${host}.tar.gz"
tar -C "$ROOT/out" -czf "$DIST/$archive" "peardata-$host"
tar -C "$ROOT/out" -czf "$DIST/$archive" "$leaf"
(cd "$DIST" && sha_file "$archive" >"${archive}.sha256")
log "staged $archive"
log "staged $archive (from $leaf)"
}
SERVER_OK=0
@@ -167,11 +198,12 @@ tar -xzf peardata-server-${VERSION}-linux-x64.tar.gz
\`\`\`bash
tar -xzf peardata-client-${VERSION}-darwin-arm64.tar.gz
open peardata-darwin-arm64/peardata.app # macOS
open peardata-darwin-arm64/peardata.app # macOS (.app name follows packager name)
# Linux: ./peardata-linux-x64/peardata-client
# Windows: peardata-win32-x64\\\\peardata-client.exe
\`\`\`
macOS clients are codesigned in CI (ad-hoc / self-signed via \`rcodesign\` on Linux)
to avoid Gatekeeper "**damaged**" false positives. First open may still need
right-click → Open unless notarized with Developer ID.
@@ -190,6 +222,12 @@ if [[ "$SERVER_OK" -eq 0 ]]; then
exit 1
fi
if [[ "${PEARDATA_SKIP_CLIENT:-0}" != "1" && "$CLIENT_OK" -eq 0 ]]; then
log "ERROR: no client artifacts staged (clients were not skipped)"
log "HINT: forge should write out/peardata-<host>/; check make:client logs above"
exit 1
fi
if [[ "${DRY_RUN:-0}" == "1" ]]; then
log "DRY_RUN=1 — skip Gitea upload"
exit 0