From 6f00a2750441f2f52b9cc5f498f625c69f70b809 Mon Sep 17 00:00:00 2001 From: h3p Date: Fri, 17 Apr 2026 10:08:57 +0200 Subject: [PATCH] Disable App Store updater and bump release build number --- .gitattributes | 1 + Neon Vision Editor.xcodeproj/project.pbxproj | 4 +- .../Core/ReleaseRuntimePolicy.swift | 10 ++- Neon Vision Editor/UI/NeonSettingsView.swift | 78 ++++++++++--------- scripts/release_prep.sh | 5 ++ 5 files changed, 57 insertions(+), 41 deletions(-) diff --git a/.gitattributes b/.gitattributes index 1bbd695..7b8ec4a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,3 @@ *.sh text eol=lf *.py text eol=lf +.githooks/* text eol=lf diff --git a/Neon Vision Editor.xcodeproj/project.pbxproj b/Neon Vision Editor.xcodeproj/project.pbxproj index 1e3d9c5..ce4650a 100644 --- a/Neon Vision Editor.xcodeproj/project.pbxproj +++ b/Neon Vision Editor.xcodeproj/project.pbxproj @@ -362,7 +362,7 @@ CODE_SIGNING_ALLOWED = YES; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 596; + CURRENT_PROJECT_VERSION = 598; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = CS727NF72U; ENABLE_APP_SANDBOX = YES; @@ -445,7 +445,7 @@ CODE_SIGNING_ALLOWED = YES; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 596; + CURRENT_PROJECT_VERSION = 598; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = CS727NF72U; ENABLE_APP_SANDBOX = YES; diff --git a/Neon Vision Editor/Core/ReleaseRuntimePolicy.swift b/Neon Vision Editor/Core/ReleaseRuntimePolicy.swift index d5f5aa7..f4877cc 100644 --- a/Neon Vision Editor/Core/ReleaseRuntimePolicy.swift +++ b/Neon Vision Editor/Core/ReleaseRuntimePolicy.swift @@ -18,11 +18,17 @@ enum ReleaseRuntimePolicy { #if os(macOS) static var isMacAppStoreDistribution: Bool { - let receiptURL = Bundle.main.bundleURL + // Treat both production and sandbox App Store receipts as App Store distribution. + if let appStoreReceiptURL = Bundle.main.appStoreReceiptURL, + FileManager.default.fileExists(atPath: appStoreReceiptURL.path) { + return true + } + + let legacyReceiptURL = Bundle.main.bundleURL .appendingPathComponent("Contents", isDirectory: true) .appendingPathComponent("_MASReceipt", isDirectory: true) .appendingPathComponent("receipt", isDirectory: false) - return FileManager.default.fileExists(atPath: receiptURL.path) + return FileManager.default.fileExists(atPath: legacyReceiptURL.path) } #endif diff --git a/Neon Vision Editor/UI/NeonSettingsView.swift b/Neon Vision Editor/UI/NeonSettingsView.swift index 3d2d63f..2959fc9 100644 --- a/Neon Vision Editor/UI/NeonSettingsView.swift +++ b/Neon Vision Editor/UI/NeonSettingsView.swift @@ -3148,39 +3148,41 @@ struct NeonSettingsView: View { private func diagnosticsSectionContent(events: [EditorPerformanceMonitor.FileOpenEvent]) -> some View { VStack(alignment: .leading, spacing: UI.space10) { - Text("Updater") - .font(.subheadline.weight(.semibold)) - Text(localized("Last check result: %@", appUpdateManager.lastCheckResultSummary)) - .font(Typography.footnote) - .foregroundStyle(.secondary) - if let checkedAt = appUpdateManager.lastCheckedAt { - Text(localized("Last checked: %@", checkedAt.formatted(date: .abbreviated, time: .shortened))) + if ReleaseRuntimePolicy.isUpdaterEnabledForCurrentDistribution { + Text("Updater") + .font(.subheadline.weight(.semibold)) + Text(localized("Last check result: %@", appUpdateManager.lastCheckResultSummary)) .font(Typography.footnote) .foregroundStyle(.secondary) - } - if let pausedUntil = appUpdateManager.pausedUntil, pausedUntil > Date() { - Text(localized("Auto-check pause active until %@ (%lld consecutive failures).", pausedUntil.formatted(date: .abbreviated, time: .shortened), appUpdateManager.consecutiveFailureCount)) + if let checkedAt = appUpdateManager.lastCheckedAt { + Text(localized("Last checked: %@", checkedAt.formatted(date: .abbreviated, time: .shortened))) + .font(Typography.footnote) + .foregroundStyle(.secondary) + } + if let pausedUntil = appUpdateManager.pausedUntil, pausedUntil > Date() { + Text(localized("Auto-check pause active until %@ (%lld consecutive failures).", pausedUntil.formatted(date: .abbreviated, time: .shortened), appUpdateManager.consecutiveFailureCount)) + .font(Typography.footnote) + .foregroundStyle(.orange) + } + Text(localized("Staged update: %@", appUpdateManager.stagedUpdateVersionSummary)) .font(Typography.footnote) - .foregroundStyle(.orange) - } - Text(localized("Staged update: %@", appUpdateManager.stagedUpdateVersionSummary)) - .font(Typography.footnote) - .foregroundStyle(.secondary) - Text(localized("Last install attempt: %@", appUpdateManager.lastInstallAttemptSummary)) - .font(Typography.footnote) - .foregroundStyle(.secondary) + .foregroundStyle(.secondary) + Text(localized("Last install attempt: %@", appUpdateManager.lastInstallAttemptSummary)) + .font(Typography.footnote) + .foregroundStyle(.secondary) - Text("Recent updater log") - .font(.subheadline.weight(.semibold)) - ScrollView { - Text(appUpdateManager.recentLogSnippet) - .font(Typography.monoBody) - .frame(maxWidth: .infinity, alignment: .leading) - .textSelection(.enabled) - } - .frame(maxHeight: 140) + Text("Recent updater log") + .font(.subheadline.weight(.semibold)) + ScrollView { + Text(appUpdateManager.recentLogSnippet) + .font(Typography.monoBody) + .frame(maxWidth: .infinity, alignment: .leading) + .textSelection(.enabled) + } + .frame(maxHeight: 140) - Divider() + Divider() + } Text("File Open Timing") .font(.subheadline.weight(.semibold)) @@ -3234,16 +3236,18 @@ struct NeonSettingsView: View { var lines: [String] = [] lines.append("Neon Vision Editor Diagnostics") lines.append("Timestamp: \(Date().formatted(date: .abbreviated, time: .shortened))") - lines.append("Updater.lastCheckResult: \(AppUpdateManager.sanitizedDiagnosticSummary(appUpdateManager.lastCheckResultSummary))") - lines.append("Updater.lastCheckedAt: \(appUpdateManager.lastCheckedAt?.formatted(date: .abbreviated, time: .shortened) ?? "never")") - lines.append("Updater.stagedVersion: \(appUpdateManager.stagedUpdateVersionSummary)") - lines.append("Updater.lastInstallAttempt: \(AppUpdateManager.sanitizedDiagnosticSummary(appUpdateManager.lastInstallAttemptSummary))") - if let pausedUntil = appUpdateManager.pausedUntil, pausedUntil > Date() { - lines.append("Updater.pauseUntil: \(pausedUntil.formatted(date: .abbreviated, time: .shortened))") + if ReleaseRuntimePolicy.isUpdaterEnabledForCurrentDistribution { + lines.append("Updater.lastCheckResult: \(AppUpdateManager.sanitizedDiagnosticSummary(appUpdateManager.lastCheckResultSummary))") + lines.append("Updater.lastCheckedAt: \(appUpdateManager.lastCheckedAt?.formatted(date: .abbreviated, time: .shortened) ?? "never")") + lines.append("Updater.stagedVersion: \(appUpdateManager.stagedUpdateVersionSummary)") + lines.append("Updater.lastInstallAttempt: \(AppUpdateManager.sanitizedDiagnosticSummary(appUpdateManager.lastInstallAttemptSummary))") + if let pausedUntil = appUpdateManager.pausedUntil, pausedUntil > Date() { + lines.append("Updater.pauseUntil: \(pausedUntil.formatted(date: .abbreviated, time: .shortened))") + } + lines.append("Updater.consecutiveFailures: \(appUpdateManager.consecutiveFailureCount)") + lines.append("Updater.logSnippet:") + lines.append(appUpdateManager.recentLogSnippet) } - lines.append("Updater.consecutiveFailures: \(appUpdateManager.consecutiveFailureCount)") - lines.append("Updater.logSnippet:") - lines.append(appUpdateManager.recentLogSnippet) lines.append("FileOpenEvents.count: \(events.count)") for event in events { lines.append( diff --git a/scripts/release_prep.sh b/scripts/release_prep.sh index 980bfea..5dd59bc 100755 --- a/scripts/release_prep.sh +++ b/scripts/release_prep.sh @@ -134,6 +134,11 @@ if [[ "$TAG" =~ ^v([0-9]+)\.([0-9]+)\.0$ ]]; then scripts/update_release_history_svg.py "$TAG" fi +if [[ -x "scripts/bump_build_number.sh" ]]; then + echo "Bumping CURRENT_PROJECT_VERSION for release commit..." + scripts/bump_build_number.sh "$PBXPROJ_FILE" +fi + git add README.md CHANGELOG.md "Neon Vision Editor/UI/PanelsAndHelpers.swift" "$PBXPROJ_FILE" \ docs/images/neon-vision-release-history-0.1-to-0.5.svg \ docs/images/neon-vision-release-history-0.1-to-0.5-light.svg