Skip to content

Commit

Permalink
Merge release/1.109.0 into main
Browse files Browse the repository at this point in the history
  • Loading branch information
daxmobile authored Oct 9, 2024
2 parents eb3b20d + 1e33788 commit 760aa0f
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 23 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build_notarized.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
if [[ "${{ env.is-official-release }}" == "true" ]]; then
echo "upload-to=s3" >> $GITHUB_OUTPUT
echo "upload-to=s3" >> $GITHUB_ENV
elif [[ -n "${{ env.asana-task-url }}" ]]; then
else
echo "upload-to=s3testbuilds" >> $GITHUB_OUTPUT
echo "upload-to=s3testbuilds" >> $GITHUB_ENV
fi
Expand Down Expand Up @@ -349,9 +349,11 @@ jobs:
echo "🔗 [${DMG_S3_PATH}](${DMG_URL})" >> $GITHUB_STEP_SUMMARY
echo "🔗 [${DSYM_S3_PATH}](${DSYM_URL})" >> $GITHUB_STEP_SUMMARY
bundle exec fastlane run asana_add_comment \
task_url:"${{ env.asana-task-url }}" \
comment:"New build is available at ${DMG_URL}."
if [[ -n "${{ env.asana-task-url }}" ]]; then
bundle exec fastlane run asana_add_comment \
task_url:"${{ env.asana-task-url }}" \
comment:"New build is available at ${DMG_URL}."
fi
mattermost:

Expand Down
2 changes: 1 addition & 1 deletion Configuration/BuildNumber.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 277
CURRENT_PROJECT_VERSION = 278
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ final class ActiveDomainPublisher {
private var activeWindowControllerCancellable: AnyCancellable?
private var activeTabViewModelCancellable: AnyCancellable?
private var activeTabContentCancellable: AnyCancellable?
private var unregisterWindowControllerCancellable: AnyCancellable?

@MainActor private weak var activeWindowController: MainWindowController? {
didSet {
Expand All @@ -47,6 +48,7 @@ final class ActiveDomainPublisher {

Task { @MainActor in
subscribeToKeyWindowControllerChanges()
subscribeToUnregisteringWindowController()
}
}

Expand Down Expand Up @@ -76,6 +78,16 @@ final class ActiveDomainPublisher {
.assign(to: \.activeDomain, onWeaklyHeld: self)
}

@MainActor
private func subscribeToUnregisteringWindowController() {
unregisterWindowControllerCancellable = windowControllersManager.didUnregisterWindowController.sink { [weak self] in
guard let self else { return }
if self.activeWindowController == $0 {
self.activeWindowController = nil
}
}
}

private func domain(from tabContent: Tab.TabContent) -> String? {
if case .url(let url, _, _) = tabContent {

Expand Down
39 changes: 21 additions & 18 deletions scripts/appcast_manager/appcastManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ final class AppcastDownloader {
prepareDirectories()
downloadAppcast()
dispatchGroup.wait()
backupAppcast()
parseAndDownloadFilesFromAppcast()
dispatchGroup.wait()

Expand Down Expand Up @@ -514,6 +515,26 @@ final class AppcastDownloader {
}
}

private func backupAppcast() {
// Check if backup file already exists and remove it
if FileManager.default.fileExists(atPath: backupFileURL.path) {
do {
try FileManager.default.removeItem(at: backupFileURL)
} catch {
print("❌ Error removing existing backup file: \(error)")
exit(1)
}
}

// Create a new backup of the appcast file
do {
try FileManager.default.copyItem(at: appcastFilePath, to: backupFileURL)
} catch {
print("❌ Error backing up appcast2.xml: \(error)")
exit(1)
}
}

private func parseAndDownloadFilesFromAppcast() {
let parser = XMLParser(contentsOf: specificDir.appendingPathComponent("appcast2.xml"))
let delegate = AppcastXMLParserDelegate(downloadFile: downloadFile, dispatchGroup: dispatchGroup)
Expand Down Expand Up @@ -773,24 +794,6 @@ func writeAppcastContent(_ content: String, to filePath: URL) {
// MARK: - Generating of New Appcast

func runGenerateAppcast(with versionNumber: String, channel: String? = nil, rolloutInterval: String? = nil, keyFile: String? = nil) {
// Check if backup file already exists and remove it
if FileManager.default.fileExists(atPath: backupFileURL.path) {
do {
try FileManager.default.removeItem(at: backupFileURL)
} catch {
print("❌ Error removing existing backup file: \(error)")
exit(1)
}
}

// Create a new backup of the appcast file
do {
try FileManager.default.copyItem(at: appcastFilePath, to: backupFileURL)
} catch {
print("❌ Error backing up appcast2.xml: \(error)")
exit(1)
}

let maximumVersions = "2"
let maximumDeltas = "2"

Expand Down

0 comments on commit 760aa0f

Please sign in to comment.