diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 289eef8d..5bedd60b 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -60,4 +60,3 @@ jobs: xcode-version: ${{ matrix.tooling.xcode-version }} - run: swift run BuildTool --platform ${{ matrix.platform }} --swift-version ${{ matrix.tooling.swift-version }} - working-directory: ./script diff --git a/Sources/BuildTool/BuildTool.swift b/Sources/BuildTool/BuildTool.swift index 539bdb4a..e4abd88a 100644 --- a/Sources/BuildTool/BuildTool.swift +++ b/Sources/BuildTool/BuildTool.swift @@ -15,9 +15,12 @@ enum Platform: String { // TODO: why is xcodebuild giving locally with iOS "--- xcodebuild: WARNING: Using the first of multiple matching destinations:" var destinationPredicate: DestinationPredicate? { switch self { - case .macOS: nil - case .iOS: .init(runtime: "iOS-17-5", deviceType: "iPhone-15") - case .tvOS: .init(runtime: "tvOS-17-5", deviceType: "Apple TV") + case .macOS: + nil + case .iOS: + .init(runtime: "iOS-17-5", deviceType: "iPhone-15") + case .tvOS: + .init(runtime: "tvOS-17-5", deviceType: "Apple TV") } } } @@ -41,15 +44,13 @@ enum Error: Swift.Error { case terminatedWithExitCode(Int32) } -// TODO Is there a better way to make sure that this script has access to macOS APIs that are more recent than the package’s deployment target? +// TODO: Is there a better way to make sure that this script has access to macOS APIs that are more recent than the package’s deployment target? @available(macOS 14, *) @main struct BuildTool: ParsableCommand { - @Option - var platform: Platform + @Option var platform: Platform - @Option - var swiftVersion: Int + @Option var swiftVersion: Int mutating func run() throws { let deviceUDID: String? = if let destinationPredicate = platform.destinationPredicate {