Skip to content

Commit 5c1f405

Browse files
committed
Remove unnecessary version checks
The deployment target is now macOS 14.
1 parent 9000ce1 commit 5c1f405

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

Sources/SWBAndroidPlatform/AndroidSDK.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ public import Foundation
5757

5858
let metaPath = ndkPath.path.join("meta")
5959

60-
guard #available(macOS 14, *) else {
61-
throw StubError.error("Unsupported macOS version")
62-
}
63-
6460
if version < Self.minimumNDKVersion {
6561
throw Error.unsupportedVersion(path: ndkPath, minimumVersion: Self.minimumNDKVersion)
6662
}

Sources/SWBCore/SpecImplementations/Tools/CodeSign.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,8 @@ public final class CodesignToolSpec : CommandLineToolSpec, SpecIdentifierType, @
191191
commandLine.append(contentsOf: ["--launch-constraint-responsible", responsibleProcessLaunchConstraint.str])
192192
}
193193

194-
if cbc.producer.systemInfo?.operatingSystemVersion >= Version(14) {
195-
if let libraryLoadConstraint = cbc.producer.signingSettings?.libraryConstraint {
196-
commandLine.append(contentsOf: ["--library-constraint", libraryLoadConstraint.str])
197-
}
194+
if let libraryLoadConstraint = cbc.producer.signingSettings?.libraryConstraint {
195+
commandLine.append(contentsOf: ["--library-constraint", libraryLoadConstraint.str])
198196
}
199197

200198
// Add the path to the file to sign.

Tests/SWBTaskConstructionTests/CodeSignTaskConstructionTests.swift

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,22 +1087,13 @@ fileprivate struct CodeSignTaskConstructionTests: CoreBasedTests {
10871087
let testWorkspace = TestWorkspace("aWorkspace", projects: [testProject])
10881088
let tester = try await TaskConstructionTester(getCore(), testWorkspace)
10891089

1090-
// Check --library-constraint is passed when the build setting is configured on macOS 14
1091-
await tester.checkBuild(BuildParameters(action: .install, configuration: "Release", overrides: ["LIBRARY_LOAD_CONSTRAINT": "/tmp/LibraryLoadConstraint.plist"]), runDestination: .macOS, systemInfo: SystemInfo(operatingSystemVersion: Version(14), productBuildVersion: "99A98", nativeArchitecture: "arm64")) { results in
1090+
// Check --library-constraint is passed
1091+
await tester.checkBuild(BuildParameters(action: .install, configuration: "Release", overrides: ["LIBRARY_LOAD_CONSTRAINT": "/tmp/LibraryLoadConstraint.plist"]), runDestination: .macOS) { results in
10921092
results.checkTarget("Tool") { target in
10931093
results.checkTask(.matchTarget(target), .matchRuleType("CodeSign")) { task in
10941094
task.checkCommandLineMatches(["/usr/bin/codesign", "--force", "--sign", "-", "--entitlements", .suffix("Tool.xcent"), "--generate-entitlement-der", "--library-constraint", .suffix("LibraryLoadConstraint.plist"), "/tmp/aProject.dst/usr/local/bin/Tool"])
10951095
}
10961096
}
10971097
}
1098-
1099-
// Check --library-constraint is *not* passed when the build setting is configured on macOS 13
1100-
await tester.checkBuild(BuildParameters(action: .install, configuration: "Release", overrides: ["LIBRARY_LOAD_CONSTRAINT": "/tmp/LibraryLoadConstraint.plist"]), runDestination: .macOS, systemInfo: SystemInfo(operatingSystemVersion: Version(13), productBuildVersion: "99A98", nativeArchitecture: "arm64")) { results in
1101-
results.checkTarget("Tool") { target in
1102-
results.checkTask(.matchTarget(target), .matchRuleType("CodeSign")) { task in
1103-
task.checkCommandLineMatches(["/usr/bin/codesign", "--force", "--sign", "-", "--entitlements", .suffix("Tool.xcent"), "--generate-entitlement-der", "/tmp/aProject.dst/usr/local/bin/Tool"])
1104-
}
1105-
}
1106-
}
11071098
}
11081099
}

0 commit comments

Comments
 (0)