Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make binary delta version 4 the default #2668

Merged
merged 1 commit into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Autoupdate/SUBinaryDeltaCommon.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

// Note: the framework bundle version must be bumped, and generate_appcast must be updated to compare it,
// when we add/change new major versions and defaults. Unit tests need to be updated to use new versions too.
SUBinaryDeltaMajorVersion SUBinaryDeltaMajorVersionDefault = SUBinaryDeltaMajorVersion3;
SUBinaryDeltaMajorVersion SUBinaryDeltaMajorVersionDefault = SUBinaryDeltaMajorVersion4;
SUBinaryDeltaMajorVersion SUBinaryDeltaMajorVersionLatest = SUBinaryDeltaMajorVersion4;
SUBinaryDeltaMajorVersion SUBinaryDeltaMajorVersionFirst = SUBinaryDeltaMajorVersion1;
SUBinaryDeltaMajorVersion SUBinaryDeltaMajorVersionFirstSupported = SUBinaryDeltaMajorVersion2;
Expand Down
13 changes: 10 additions & 3 deletions generate_appcast/Appcast.swift
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,20 @@ func makeAppcasts(archivesSourceDir: URL, outputPathURL: URL?, cacheDirectory ca
// Decide the most appropriate delta version
let deltaVersion: SUBinaryDeltaMajorVersion
if let frameworkVersion = item.frameworkVersion {
switch standardComparator.compareVersion(frameworkVersion, toVersion: "2010") {
switch standardComparator.compareVersion(frameworkVersion, toVersion: "2041") {
case .orderedSame:
fallthrough
case .orderedDescending:
deltaVersion = .version3
deltaVersion = .version4
case .orderedAscending:
deltaVersion = .version2
switch standardComparator.compareVersion(frameworkVersion, toVersion: "2010") {
case .orderedSame:
fallthrough
case .orderedDescending:
deltaVersion = .version3
case .orderedAscending:
deltaVersion = .version2
}
}
} else {
deltaVersion = SUBinaryDeltaMajorVersionDefault
Expand Down
Loading