From 5db1292e73782ae36ac36fd75ce8c953a812fd0a Mon Sep 17 00:00:00 2001 From: john Date: Wed, 18 Nov 2026 15:17:00 +0800 Subject: [PATCH] Use native Goose jobs during Portal releases --- scripts/release-portal-runtime-prod.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/release-portal-runtime-prod.sh b/scripts/release-portal-runtime-prod.sh index ba28faa..100f94b 100755 --- a/scripts/release-portal-runtime-prod.sh +++ b/scripts/release-portal-runtime-prod.sh @@ -523,13 +523,23 @@ remount_goosed_after_live_swap() { return 1 fi - if [[ ! -x "${docker_bin}" || ! -f "${compose_file}" ]]; then + local gui="gui/$(id -u)" + local native_jobs=0 + for port in "${native_ports[@]}"; do + if launchctl print "${gui}/cn.tkmind.goosed-native-${port}" >/dev/null 2>&1; then + native_jobs=$((native_jobs + 1)) + fi + done + if (( native_jobs > 0 && native_jobs != ${#native_ports[@]} )); then + echo "goosed remount failed: configured targets span native and non-native services" >&2 + return 1 + fi + + if [[ "${native_jobs}" -eq "${#native_ports[@]}" || ! -x "${docker_bin}" || ! -f "${compose_file}" ]]; then say "重启 native goosed 以刷新 Portal/MindSpace bind mount" mkdir -p "${APP_DIR}" printf '%s\n' "${marker_value}" > "${marker_host}" - local gui="gui/$(id -u)" - local port for port in "${native_ports[@]}"; do launchctl kickstart -k "${gui}/cn.tkmind.goosed-native-${port}" >/dev/null 2>&1 || true done