Skip to content

Commit f07ebd3

Browse files
committed
Fix turfVersion type and script to set version for SPM test
1 parent 5b95a8e commit f07ebd3

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
let commonVersion = "24.9.0-daily-2024-11-13-04-26"
88
let commonChecksum = "16deedc1d8a3bb5b0bebd3e7eb222c87056f04cd9448af21059eed4228c44153"
99

10-
let turfVersion = "4.0.0-beta.1"
10+
let turfVersion: Version = "4.0.0-beta.1"
1111

1212
let package = Package(
1313
name: "MapboxCommon",

Tests/Integration/SPM/project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ options:
44
packages:
55
MapboxCommon:
66
url: [email protected]:mapbox/mapbox-common-ios.git
7-
branch: release-v24.0.0-rc.2
7+
branch: v24.9.0-daily-2024-11-12-04-00
88
targets:
99
SPMTest:
1010
type: application

scripts/release/Sources/set-marketing-version/main.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ struct MarketingVersion: ParsableCommand {
4545
try content.write(toFile: url.path, atomically: true, encoding: .utf8)
4646
}
4747

48+
func runCarthageVersionUpdate() throws {
49+
let cartfileURL = projectPathURL.appendingPathComponent("Tests/Integration/Carthage/Cartfile")
50+
try replaceLineContaining("binary \"https://api.mapbox.com/downloads/v2/carthage/mapbox-common/",
51+
with: "binary \"https://api.mapbox.com/downloads/v2/carthage/mapbox-common/MapboxCommon.json\" == \(marketingVersion)",
52+
in: cartfileURL)
53+
}
54+
4855
func runCocoaPodsVersionUpdate() throws {
4956
let podfileURL = projectPathURL.appendingPathComponent("Tests/Integration/CocoaPods/Podfile")
5057
try replaceLineContaining("pod 'MapboxCommon'",
@@ -54,8 +61,8 @@ struct MarketingVersion: ParsableCommand {
5461

5562
func runSPMVersionUpdate() throws {
5663
let spmManifestURL = projectPathURL.appendingPathComponent("Tests/Integration/SPM/project.yml")
57-
try replaceLineContaining("branch: release/v",
58-
with: " branch: release/v\(marketingVersion)",
64+
try replaceLineContaining("branch: v",
65+
with: " branch: v\(marketingVersion)",
5966
in: spmManifestURL)
6067
let spmPackageURL = projectPathURL.appendingPathComponent("Package.swift")
6168
try replaceLineContaining("let version =",
@@ -78,6 +85,7 @@ struct MarketingVersion: ParsableCommand {
7885
mutating func run() throws {
7986
try runCocoaPodsVersionUpdate()
8087
try runSPMVersionUpdate()
88+
try runCarthageVersionUpdate()
8189

8290
if isPreRelease {
8391
print("Not updating README.md because this is a proper release.")

0 commit comments

Comments
 (0)