From f07ebd34ca932618026aaa88c3dac3c0dac2dbaa Mon Sep 17 00:00:00 2001 From: Aleksei Sapitskii Date: Tue, 12 Nov 2024 20:03:58 +0200 Subject: [PATCH] Fix turfVersion type and script to set version for SPM test --- Package.swift | 2 +- Tests/Integration/SPM/project.yml | 2 +- .../release/Sources/set-marketing-version/main.swift | 12 ++++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Package.swift b/Package.swift index 0fcfc0f..9add72f 100644 --- a/Package.swift +++ b/Package.swift @@ -7,7 +7,7 @@ import Foundation let commonVersion = "24.9.0-daily-2024-11-13-04-26" let commonChecksum = "16deedc1d8a3bb5b0bebd3e7eb222c87056f04cd9448af21059eed4228c44153" -let turfVersion = "4.0.0-beta.1" +let turfVersion: Version = "4.0.0-beta.1" let package = Package( name: "MapboxCommon", diff --git a/Tests/Integration/SPM/project.yml b/Tests/Integration/SPM/project.yml index 97f25b8..3cbb3f7 100644 --- a/Tests/Integration/SPM/project.yml +++ b/Tests/Integration/SPM/project.yml @@ -4,7 +4,7 @@ options: packages: MapboxCommon: url: git@github.com:mapbox/mapbox-common-ios.git - branch: release-v24.0.0-rc.2 + branch: v24.9.0-daily-2024-11-12-04-00 targets: SPMTest: type: application diff --git a/scripts/release/Sources/set-marketing-version/main.swift b/scripts/release/Sources/set-marketing-version/main.swift index 783a8c6..b0bf189 100644 --- a/scripts/release/Sources/set-marketing-version/main.swift +++ b/scripts/release/Sources/set-marketing-version/main.swift @@ -45,6 +45,13 @@ struct MarketingVersion: ParsableCommand { try content.write(toFile: url.path, atomically: true, encoding: .utf8) } + func runCarthageVersionUpdate() throws { + let cartfileURL = projectPathURL.appendingPathComponent("Tests/Integration/Carthage/Cartfile") + try replaceLineContaining("binary \"https://api.mapbox.com/downloads/v2/carthage/mapbox-common/", + with: "binary \"https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json\" == \(marketingVersion)", + in: cartfileURL) + } + func runCocoaPodsVersionUpdate() throws { let podfileURL = projectPathURL.appendingPathComponent("Tests/Integration/CocoaPods/Podfile") try replaceLineContaining("pod 'MapboxCommon'", @@ -54,8 +61,8 @@ struct MarketingVersion: ParsableCommand { func runSPMVersionUpdate() throws { let spmManifestURL = projectPathURL.appendingPathComponent("Tests/Integration/SPM/project.yml") - try replaceLineContaining("branch: release/v", - with: " branch: release/v\(marketingVersion)", + try replaceLineContaining("branch: v", + with: " branch: v\(marketingVersion)", in: spmManifestURL) let spmPackageURL = projectPathURL.appendingPathComponent("Package.swift") try replaceLineContaining("let version =", @@ -78,6 +85,7 @@ struct MarketingVersion: ParsableCommand { mutating func run() throws { try runCocoaPodsVersionUpdate() try runSPMVersionUpdate() + try runCarthageVersionUpdate() if isPreRelease { print("Not updating README.md because this is a proper release.")