Skip to content

Commit

Permalink
Switch to binary Turf (#2347)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksproger authored Nov 8, 2024
1 parent 1cdf682 commit 7cc3859
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Apps/Apps.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/mapbox/turf-swift.git",
"state" : {
"revision" : "1997fb3c3dc0d8181690a1ec192ed907bcead9e8",
"version" : "3.0.0"
"revision" : "f869ec2055ace4f95101b623a45f1506fa6f1503",
"version" : "4.0.0-beta.1"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion MapboxMaps.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ Pod::Spec.new do |m|

m.dependency 'MapboxCoreMaps', '11.8.0'
m.dependency 'MapboxCommon', '24.8.0'
m.dependency 'Turf', '3.0.0'
m.dependency 'Turf', '4.0.0-beta.1'

end
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/mapbox/turf-swift.git",
"state" : {
"revision" : "1997fb3c3dc0d8181690a1ec192ed907bcead9e8",
"version" : "3.0.0"
"revision" : "f869ec2055ace4f95101b623a45f1506fa6f1503",
"version" : "4.0.0-beta.1"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let package = Package(
targets: ["MapboxMaps"]),
],
dependencies: [
.package(url: "https://github.com/mapbox/turf-swift.git", exact: "3.0.0"),
.package(url: "https://github.com/mapbox/turf-swift.git", exact: "4.0.0-beta.1"),
] + coreMaps.packageDependencies + common.packageDependencies,
targets: [
.target(
Expand Down
10 changes: 7 additions & 3 deletions scripts/prepare_binary_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ cat <<EOF > Cartfile.MapboxCommon.json
{"$MAPBOX_COMMON_VERSION": "https://api.mapbox.com/downloads/v2/mapbox-common/$(release_folder "$MAPBOX_COMMON_VERSION")/ios/packages/$MAPBOX_COMMON_VERSION/MapboxCommon.zip"}
EOF

cat <<EOF > Cartfile.Turf.json
{"$MAPBOX_TURF_VERSION": "https://github.com/mapbox/turf-swift/releases/download/v$MAPBOX_TURF_VERSION/Turf.xcframework.zip"}
EOF

cat <<EOF > Cartfile
# xcode version: $XCODE_VERSION
binary "Cartfile.MapboxCoreMaps.json" == $MAPBOX_CORE_MAPS_VERSION
binary "Cartfile.MapboxCommon.json" == $MAPBOX_COMMON_VERSION
github "mapbox/turf-swift" == $MAPBOX_TURF_VERSION
binary "Cartfile.Turf.json" == $MAPBOX_TURF_VERSION
EOF

Expand All @@ -36,7 +40,7 @@ BUILD_LIBRARY_FOR_DISTRIBUTION=YES
EOF

mkdir -p Carthage
CURRENT_CONFIG_HASH=$(cat Cartfile Cartfile.xcconfig Cartfile.MapboxCoreMaps.json Cartfile.MapboxCommon.json | shasum -a 256)
CURRENT_CONFIG_HASH=$(cat Cartfile Cartfile.xcconfig Cartfile.MapboxCoreMaps.json Cartfile.MapboxCommon.json Cartfile.Turf.json | shasum -a 256)

EXPECTED_CONFIG_HASH=""
if [[ -f Carthage/config.version ]]; then
Expand Down Expand Up @@ -64,4 +68,4 @@ if [[ "$CURRENT_CONFIG_HASH" != "$EXPECTED_CONFIG_HASH" ]]; then
echo "$CURRENT_CONFIG_HASH" > Carthage/config.version
fi

rm -f Cartfile Cartfile.resolved Cartfile.xcconfig Cartfile.MapboxCoreMaps.json Cartfile.MapboxCommon.json
rm -f Cartfile Cartfile.resolved Cartfile.xcconfig Cartfile.MapboxCoreMaps.json Cartfile.MapboxCommon.json Cartfile.Turf.json
2 changes: 1 addition & 1 deletion scripts/release/packager/versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"MapboxCoreMaps": "11.8.0",
"MapboxCommon": "24.8.0",
"Turf": "3.0.0"
"Turf": "4.0.0-beta.1"
}

0 comments on commit 7cc3859

Please sign in to comment.