mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 03:50:08 +02:00
👌 Fix updater bundle logic, skip release notes
This commit is contained in:
@ -3299,6 +3299,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
|
CURRENT_PROJECT_VERSION = 1205;
|
||||||
DEAD_CODE_STRIPPING = YES;
|
DEAD_CODE_STRIPPING = YES;
|
||||||
DEBUG = YES;
|
DEBUG = YES;
|
||||||
DEVELOPMENT_TEAM = 8M54J5J787;
|
DEVELOPMENT_TEAM = 8M54J5J787;
|
||||||
@ -3328,7 +3329,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1200;
|
CURRENT_PROJECT_VERSION = 1205;
|
||||||
DEAD_CODE_STRIPPING = YES;
|
DEAD_CODE_STRIPPING = YES;
|
||||||
DEBUG = NO;
|
DEBUG = NO;
|
||||||
DEVELOPMENT_TEAM = 8M54J5J787;
|
DEVELOPMENT_TEAM = 8M54J5J787;
|
||||||
@ -3557,7 +3558,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1200;
|
CURRENT_PROJECT_VERSION = 1205;
|
||||||
DEBUG = NO;
|
DEBUG = NO;
|
||||||
DEVELOPMENT_TEAM = 8M54J5J787;
|
DEVELOPMENT_TEAM = 8M54J5J787;
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
@ -3668,7 +3669,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1200;
|
CURRENT_PROJECT_VERSION = 1205;
|
||||||
DEBUG = YES;
|
DEBUG = YES;
|
||||||
DEVELOPMENT_TEAM = 8M54J5J787;
|
DEVELOPMENT_TEAM = 8M54J5J787;
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
@ -3779,7 +3780,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1200;
|
CURRENT_PROJECT_VERSION = 1205;
|
||||||
DEBUG = YES;
|
DEBUG = YES;
|
||||||
DEVELOPMENT_TEAM = 8M54J5J787;
|
DEVELOPMENT_TEAM = 8M54J5J787;
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
@ -3952,7 +3953,7 @@
|
|||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 1200;
|
CURRENT_PROJECT_VERSION = 1205;
|
||||||
DEBUG = NO;
|
DEBUG = NO;
|
||||||
DEVELOPMENT_TEAM = 8M54J5J787;
|
DEVELOPMENT_TEAM = 8M54J5J787;
|
||||||
ENABLE_HARDENED_RUNTIME = YES;
|
ENABLE_HARDENED_RUNTIME = YES;
|
||||||
|
@ -24,14 +24,8 @@ class LaunchControl {
|
|||||||
public static func terminateApplications(bundleIds: [String]) async {
|
public static func terminateApplications(bundleIds: [String]) async {
|
||||||
let runningApplications = NSWorkspace.shared.runningApplications
|
let runningApplications = NSWorkspace.shared.runningApplications
|
||||||
|
|
||||||
// Look for these instances
|
|
||||||
let ids = [
|
|
||||||
"com.nicoverbruggen.phpmon.dev",
|
|
||||||
"com.nicoverbruggen.phpmon"
|
|
||||||
]
|
|
||||||
|
|
||||||
// Terminate all instances found
|
// Terminate all instances found
|
||||||
for id in ids {
|
for id in bundleIds {
|
||||||
if let phpmon = runningApplications.first(where: {
|
if let phpmon = runningApplications.first(where: {
|
||||||
(application) in return application.bundleIdentifier == id
|
(application) in return application.bundleIdentifier == id
|
||||||
}) {
|
}) {
|
||||||
|
@ -26,7 +26,7 @@ class AppUpdater {
|
|||||||
|
|
||||||
var caskUrl = Constants.Urls.StableBuildCaskFile
|
var caskUrl = Constants.Urls.StableBuildCaskFile
|
||||||
|
|
||||||
if App.identifier.contains("phpmon.eap") {
|
if App.identifier.contains(".phpmon.eap") {
|
||||||
caskUrl = Constants.Urls.EarlyAccessCaskFile
|
caskUrl = Constants.Urls.EarlyAccessCaskFile
|
||||||
} else if App.identifier.contains(".phpmon.dev") {
|
} else if App.identifier.contains(".phpmon.dev") {
|
||||||
caskUrl = Constants.Urls.DevBuildCaskFile
|
caskUrl = Constants.Urls.DevBuildCaskFile
|
||||||
@ -72,7 +72,7 @@ class AppUpdater {
|
|||||||
: "brew upgrade phpmon"
|
: "brew upgrade phpmon"
|
||||||
|
|
||||||
Task { @MainActor in
|
Task { @MainActor in
|
||||||
BetterAlert().withInformation(
|
var alert = BetterAlert().withInformation(
|
||||||
title: "updater.alerts.newer_version_available.title"
|
title: "updater.alerts.newer_version_available.title"
|
||||||
.localized(latestVersionOnline.humanReadable),
|
.localized(latestVersionOnline.humanReadable),
|
||||||
subtitle: "updater.alerts.newer_version_available.subtitle"
|
subtitle: "updater.alerts.newer_version_available.subtitle"
|
||||||
@ -89,17 +89,21 @@ class AppUpdater {
|
|||||||
vc.close(with: .OK)
|
vc.close(with: .OK)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
.withSecondary(
|
|
||||||
text: "updater.alerts.buttons.release_notes".localized,
|
if !App.identifier.contains(".phpmon.eap") {
|
||||||
action: { _ in
|
alert = alert.withSecondary(
|
||||||
let urlSegments = self.caskFile.url.split(separator: "/")
|
text: "updater.alerts.buttons.release_notes".localized,
|
||||||
let tag = urlSegments[urlSegments.count - 2] // ../download/{tag}/{file.zip}
|
action: { _ in
|
||||||
NSWorkspace.shared.open(
|
let urlSegments = self.caskFile.url.split(separator: "/")
|
||||||
Constants.Urls.GitHubReleases.appendingPathComponent("/tag/\(tag)")
|
let tag = urlSegments[urlSegments.count - 2] // ../download/{tag}/{file.zip}
|
||||||
)
|
NSWorkspace.shared.open(
|
||||||
}
|
Constants.Urls.GitHubReleases.appendingPathComponent("/tag/\(tag)")
|
||||||
)
|
)
|
||||||
.withTertiary(text: "updater.alerts.buttons.dismiss".localized, action: { vc in
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
alert.withTertiary(text: "updater.alerts.buttons.dismiss".localized, action: { vc in
|
||||||
vc.close(with: .OK)
|
vc.close(with: .OK)
|
||||||
})
|
})
|
||||||
.show()
|
.show()
|
||||||
|
Reference in New Issue
Block a user