Skip to content
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
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ on:
jobs:
build:
name: Build
runs-on: macos-14
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: swift-actions/setup-swift@v2
- name: Install Apple Developer ID Application Certificate
env:
Expand All @@ -30,7 +30,9 @@ jobs:
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
security unlock-keychain -p "$APPLE_DEVELOPER_KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
security import "$APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_PATH" -P "$APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k "$KEYCHAIN_PATH"
security import "$APPLE_DEVELOPER_CERTIFICATE_AUTHORITY_PATH" -P "$APPLE_DEVELOPER_CERTIFICATE_PASSWORD" -A -t cert -f pkcs7 -k "$KEYCHAIN_PATH"
if ! security find-certificate -c "Developer ID Certification Authority" "$KEYCHAIN_PATH" ; then
security import "$APPLE_DEVELOPER_CERTIFICATE_AUTHORITY_PATH" -P "$APPLE_DEVELOPER_CERTIFICATE_PASSWORD" -A -t cert -f pkcs7 -k "$KEYCHAIN_PATH"
fi
security list-keychain -d user -s "$KEYCHAIN_PATH"
- name: Build mist
run: swift build --configuration release --arch arm64 --arch x86_64
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/draft_new_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: workflow_dispatch
jobs:
build:
name: Draft New Release
runs-on: macos-14
runs-on: macos-15
env:
APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE }}
APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_PASSWORD }}
Expand All @@ -18,7 +18,7 @@ jobs:
APPLE_DEVELOPER_TEAM_ID: "7K3HVCLV7Z"
KEYCHAIN_FILE: "apple-developer.keychain-db"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: swift-actions/setup-swift@v2
- name: Install Apple Developer ID Certificates
run: |
Expand All @@ -33,7 +33,9 @@ jobs:
security unlock-keychain -p "$APPLE_DEVELOPER_KEYCHAIN_PASSWORD" "$RUNNER_TEMP/$KEYCHAIN_FILE"
security import "$APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_PATH" -P "$APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k "$RUNNER_TEMP/$KEYCHAIN_FILE"
security import "$APPLE_DEVELOPER_ID_INSTALLER_CERTIFICATE_PATH" -P "$APPLE_DEVELOPER_ID_INSTALLER_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k "$RUNNER_TEMP/$KEYCHAIN_FILE"
security import "$APPLE_DEVELOPER_CERTIFICATE_AUTHORITY_PATH" -P "$APPLE_DEVELOPER_CERTIFICATE_PASSWORD" -A -t cert -f pkcs7 -k "$RUNNER_TEMP/$KEYCHAIN_FILE"
if ! security find-certificate -c "Developer ID Certification Authority" "$RUNNER_TEMP/$KEYCHAIN_FILE" ; then
security import "$APPLE_DEVELOPER_CERTIFICATE_AUTHORITY_PATH" -P "$APPLE_DEVELOPER_CERTIFICATE_PASSWORD" -A -t cert -f pkcs7 -k "$RUNNER_TEMP/$KEYCHAIN_FILE"
fi
security list-keychain -d user -s "$RUNNER_TEMP/$KEYCHAIN_FILE"
- name: Build mist
run: swift build --configuration release --arch arm64 --arch x86_64
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ on:
jobs:
linting:
name: Linting
runs-on: macos-14
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: swift-actions/setup-swift@v2
- uses: sinoru/actions-swiftlint@v6
- uses: m-takuma/setup-swiftlint@1.0.0
- name: Print SwiftLint version
run: swiftlint --version
- name: Run SwiftLint
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ on:
jobs:
unit_tests:
name: Unit Tests
runs-on: macos-14
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: swift-actions/setup-swift@v2
- name: Run Unit Tests
run: swift test
1 change: 1 addition & 0 deletions Mist/Commands/Download/DownloadFirmwareOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct DownloadFirmwareOptions: ParsableArguments {

Name │ Version │ Build
───────────────┼─────────┼──────
macOS Tahoe | 26.x │ 25xyz
macOS Sequoia | 15.x │ 24xyz
macOS Sonoma │ 14.x │ 23xyz
macOS Ventura │ 13.x │ 22xyz
Expand Down
1 change: 1 addition & 0 deletions Mist/Commands/Download/DownloadInstallerOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct DownloadInstallerOptions: ParsableArguments {

Name │ Version │ Build
───────────────────┼─────────┼──────
macOS Tahoe │ 26.x │ 25xyz
macOS Sequoia │ 15.x │ 24xyz
macOS Sonoma │ 14.x │ 23xyz
macOS Ventura │ 13.x │ 22xyz
Expand Down
1 change: 1 addition & 0 deletions Mist/Commands/List/ListFirmwareOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct ListFirmwareOptions: ParsableArguments {

Name │ Version │ Build
───────────────┼─────────┼──────
macOS Tahoe │ 26.x │ 25xyz
macOS Sequoia │ 15.x │ 24xyz
macOS Sonoma │ 14.x │ 23xyz
macOS Ventura │ 13.x │ 22xyz
Expand Down
1 change: 1 addition & 0 deletions Mist/Commands/List/ListInstallerOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ struct ListInstallerOptions: ParsableArguments {

Name │ Version │ Build
───────────────────┼─────────┼──────
macOS Tahoe │ 26.x │ 25xyz
macOS Sequoia │ 15.x │ 24xyz
macOS Sonoma │ 14.x │ 23xyz
macOS Ventura │ 13.x │ 22xyz
Expand Down
2 changes: 2 additions & 0 deletions Mist/Extensions/Sequence+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Yams

extension Sequence where Iterator.Element == [String: Any] {
// swiftlint:disable function_body_length

/// Returns an ASCII-formatted table string for the provided array of `Firmware` dictionaries.
///
/// - Parameters:
Expand Down Expand Up @@ -90,6 +91,7 @@ extension Sequence where Iterator.Element == [String: Any] {
// swiftlint:enable function_body_length

// swiftlint:disable function_body_length

/// Returns an ASCII-formatted table string for the provided array of `Installer` dictionaries.
///
/// - Parameters:
Expand Down
22 changes: 16 additions & 6 deletions Mist/Helpers/InstallerCreator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import Foundation

/// Helper Struct used to install macOS Installers.
enum InstallerCreator {
// swiftlint:disable function_body_length

/// Creates a recently downloaded macOS Installer.
///
/// - Parameters:
Expand Down Expand Up @@ -55,14 +57,20 @@ enum InstallerCreator {
let arguments: [String] = ["hdiutil", "detach", legacyDiskImageMountPointURL.path, "-force"]
_ = try Shell.execute(arguments)
} else {
guard let url: URL = URL(string: installer.distribution) else {
throw MistError.invalidURL(installer.distribution)
}
!options.quiet ? PrettyPrint.print("Creating new installer '\(installer.temporaryInstallerURL.path)'...", noAnsi: options.noAnsi) : Mist.noop()

let distributionURL: URL = temporaryURL.appendingPathComponent(url.lastPathComponent)
if installer.containsInstallAssistantPackage {
let installAssistantPackageURL: URL = temporaryURL.appendingPathComponent("InstallAssistant.pkg")
arguments = ["installer", "-pkg", installAssistantPackageURL.path, "-target", installer.temporaryDiskImageMountPointURL.path]
} else {
guard let url: URL = URL(string: installer.distribution) else {
throw MistError.invalidURL(installer.distribution)
}

let distributionURL: URL = temporaryURL.appendingPathComponent(url.lastPathComponent)
arguments = ["installer", "-pkg", distributionURL.path, "-target", installer.temporaryDiskImageMountPointURL.path]
}

!options.quiet ? PrettyPrint.print("Creating new installer '\(installer.temporaryInstallerURL.path)'...", noAnsi: options.noAnsi) : Mist.noop()
arguments = ["installer", "-pkg", distributionURL.path, "-target", installer.temporaryDiskImageMountPointURL.path]
let variables: [String: String] = ["CM_BUILD": "CM_BUILD"]
_ = try Shell.execute(arguments, environment: variables)
}
Expand All @@ -80,4 +88,6 @@ enum InstallerCreator {

!options.quiet ? PrettyPrint.print("Created new installer '\(installer.temporaryInstallerURL.path)'", noAnsi: options.noAnsi) : Mist.noop()
}

// swiftlint:enable function_body_length
}
26 changes: 15 additions & 11 deletions Mist/Model/Catalog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,11 @@ enum Catalog: String, CaseIterable {
case `public`

static var urls: [String] {
allCases.map(\.url) + allCases.map(\.sequoiaURL)
allCases.map(\.sequoiaURL) + allCases.map(\.tahoeURL)
}

var url: String {
switch self {
case .standard:
"https://swscan.apple.com/content/catalogs/others/index-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"
case .customer:
"https://swscan.apple.com/content/catalogs/others/index-14customerseed-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"
case .developer:
"https://swscan.apple.com/content/catalogs/others/index-14seed-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"
case .public:
"https://swscan.apple.com/content/catalogs/others/index-14beta-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"
}
sequoiaURL
}

private var sequoiaURL: String {
Expand All @@ -40,4 +31,17 @@ enum Catalog: String, CaseIterable {
"https://swscan.apple.com/content/catalogs/others/index-15beta-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"
}
}

private var tahoeURL: String {
switch self {
case .standard:
"https://swscan.apple.com/content/catalogs/others/index-26-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"
case .customer: // swiftlint:disable:next line_length
"https://swscan.apple.com/content/catalogs/others/index-26customerseed-26-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"
case .developer:
"https://swscan.apple.com/content/catalogs/others/index-26seed-26-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"
case .public:
"https://swscan.apple.com/content/catalogs/others/index-26beta-26-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz"
}
}
}
4 changes: 3 additions & 1 deletion Mist/Model/Firmware.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ struct Firmware: Decodable {
var name: String {
var name: String = ""

if version.range(of: "^15", options: .regularExpression) != nil {
if version.range(of: "^26", options: .regularExpression) != nil {
name = "macOS Tahoe"
} else if version.range(of: "^15", options: .regularExpression) != nil {
name = "macOS Sequoia"
} else if version.range(of: "^14", options: .regularExpression) != nil {
name = "macOS Sonoma"
Expand Down
6 changes: 5 additions & 1 deletion Mist/Model/Installer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,10 @@ struct Installer: Decodable {
(sierraOrOlder ? [] : [Package(url: distribution, size: 0, integrityDataURL: nil, integrityDataSize: nil)]) + packages.sorted { $0.filename < $1.filename }
}

var containsInstallAssistantPackage: Bool {
packages.contains { $0.filename == "InstallAssistant.pkg" }
}

var temporaryDiskImageMountPointURL: URL {
URL(fileURLWithPath: "/Volumes/\(identifier)")
}
Expand Down Expand Up @@ -615,7 +619,7 @@ struct Installer: Decodable {
}

var bigSurOrNewer: Bool {
version.range(of: "^1[1-9]\\.", options: .regularExpression) != nil
version.range(of: "^(1[1-5]|26)\\.", options: .regularExpression) != nil
}

var beta: Bool {
Expand Down