Skip to content

Commit

Permalink
Merge pull request #96 from mapbox/ci-internal-main-merge
Browse files Browse the repository at this point in the history
internal to main merge.
  • Loading branch information
evil159 committed Feb 15, 2023
2 parents ea3705a + 4ce3868 commit ef7678f
Show file tree
Hide file tree
Showing 16 changed files with 113 additions and 35 deletions.
15 changes: 4 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -574,22 +574,16 @@ jobs:
- run:
name: Check for up-to-date LICENSE.md
command: |
COREMAPS_VERSION=$(jq -r .MapboxCoreMaps scripts/release/packager/versions.json)
export GITHUB_TOKEN=$(mbx-ci github reader token)
DEPENDENCY_CONTENT=$(gh api -H "Accept: application/vnd.github+json" "/repos/mapbox/mapbox-gl-native-internal/contents/LICENSE-iOS.md?ref=maps-v$COREMAPS_VERSION" --jq ".content" | base64 --decode)
EXPECTED_LICENSE=$(scripts/license/generate-license.sh)
# Check if length of dependency content is 0
if [ ${#DEPENDENCY_CONTENT} -eq 0 ]; then
echo "LICENSE-iOS.md is empty"
exit 1
fi
if [[ "$(cat LICENSE.md)" == *"$DEPENDENCY_CONTENT"* ]];
if [[ "$(cat LICENSE.md)" == "$EXPECTED_LICENSE" ]];
then
echo "LICENSE.md is up-to-date"
exit 0
else
echo "LICENSE.md is not up-to-date."
echo "LICENSE.md is not up-to-date.\n\nExpected LICENSE.md:"
echo "$EXPECTED_LICENSE"
exit 1
fi
Expand Down Expand Up @@ -1434,7 +1428,6 @@ jobs:
report_failure: true
message: "Failed to upload docc"


# ==============================================================================
# Reusable commands
commands:
Expand Down
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
CHANGELOG.md merge=union

# Mark files as generated in Github PRs
Sources/MapboxMaps/Style/Generated/** linguist-generated=true
Sources/MapboxMaps/Style/Generated/** linguist-generated=true
LICENSE.md linguist-generated=true
2 changes: 1 addition & 1 deletion .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exemptLabels:

pulls:
daysUntilStale: 60
daysUntilClose: -1
daysUntilClose: 7
markComment: false
closeComment: >
This pull request has been automatically detected as stale because it has not had
Expand Down
8 changes: 4 additions & 4 deletions Apps/Apps.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
"repositoryURL": "https://github.com/mapbox/mapbox-common-ios.git",
"state": {
"branch": null,
"revision": "775d6d749821f41ab25798eeaad1089ae250fd4c",
"version": "23.3.0-rc.1"
"revision": "e3cd831a81e262293311e09ada14053284314ccf",
"version": "23.3.1"
}
},
{
"package": "MapboxCoreMaps",
"repositoryURL": "https://github.com/mapbox/mapbox-core-maps-ios.git",
"state": {
"branch": null,
"revision": "d16dc2b0a053611b81b3b2ce4052a8662f849d72",
"version": "10.11.0-rc.1"
"revision": "dae13ea834725edb95e74c8b632578ff92f12c6c",
"version": "10.11.1"
}
},
{
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@

Mapbox welcomes participation and contributions from everyone.

* Introduce `model-scale-mode` API to enable 3d puck size to stay similar in screen-space. ([#94](https://github.com/mapbox/mapbox-maps-ios-private/pull/94))
## main

* Added basic signposts for performance profiling. To enable them, use `MAPBOX_MAPS_SIGNPOSTS_ENABLED` environment variable. ([#1818](https://github.com/mapbox/mapbox-maps-ios/pull/1818))
* Fix build erros appearing when SDK distributed as a static library through Cocoapods. ([#1888](https://github.com/mapbox/mapbox-maps-ios/pull/1888))
* Introduce `model-scale-mode` API to enable 3d puck size to stay similar in screen-space. ([#94](https://github.com/mapbox/mapbox-maps-ios-private/pull/94))

## 10.11.0 - February 8, 2023
* Update to MapboxCoreMaps 10.11.1 and MapboxCommon 23.3.1. ([#1899](https://github.com/mapbox/mapbox-maps-ios/pull/1899))

## 10.11.0-rc.1 - January 26, 2023

Expand Down
25 changes: 23 additions & 2 deletions LICENSE.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions MapboxMaps.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |m|

maps_version = '10.11.0-rc.1-private'
maps_version = '10.11.0-private'

m.name = 'MapboxMaps'
m.version = maps_version
Expand All @@ -19,11 +19,16 @@ Pod::Spec.new do |m|
m.swift_version = '5.5'

m.source_files = 'Sources/MapboxMaps/**/*.{swift,h}'
m.resources = ['Sources/**/*.{xcassets,strings}', 'Sources/MapboxMaps/MapboxMaps.json']
m.resource_bundles = { 'MapboxMapsResources' => ['Sources/**/*.{xcassets,strings}', 'Sources/MapboxMaps/MapboxMaps.json'] }

m.dependency 'MapboxCoreMaps', '10.11.0-rc.1'

# Xcode 14.x throws an error about code signing on resource bundles, turn it off for now.
# TODO: remove after Cocoapods 1.12 is released
m.pod_target_xcconfig = { 'CODE_SIGNING_ALLOWED' => 'NO' }

m.dependency 'MapboxCoreMaps', '10.11.1'
m.dependency 'MapboxMobileEvents', '1.0.10'
m.dependency 'MapboxCommon', '23.3.0-rc.1'
m.dependency 'MapboxCommon', '23.3.1'
m.dependency 'Turf', '~> 2.0'

end
8 changes: 4 additions & 4 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
"repositoryURL": "https://github.com/mapbox/mapbox-common-ios.git",
"state": {
"branch": null,
"revision": "775d6d749821f41ab25798eeaad1089ae250fd4c",
"version": "23.3.0-rc.1"
"revision": "e3cd831a81e262293311e09ada14053284314ccf",
"version": "23.3.1"
}
},
{
"package": "MapboxCoreMaps",
"repositoryURL": "https://github.com/mapbox/mapbox-core-maps-ios.git",
"state": {
"branch": null,
"revision": "d16dc2b0a053611b81b3b2ce4052a8662f849d72",
"version": "10.11.0-rc.1"
"revision": "dae13ea834725edb95e74c8b632578ff92f12c6c",
"version": "10.11.1"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ let package = Package(
targets: ["MapboxMaps"]),
],
dependencies: [
.package(name: "MapboxCoreMaps", url: "https://github.com/mapbox/mapbox-core-maps-ios.git", .exact("10.11.0-rc.1")),
.package(name: "MapboxCoreMaps", url: "https://github.com/mapbox/mapbox-core-maps-ios.git", .exact("10.11.1")),
// We keep MME dependency for compatibility reasons
.package(name: "MapboxMobileEvents", url: "https://github.com/mapbox/mapbox-events-ios.git", .exact("1.0.10")),
.package(name: "MapboxCommon", url: "https://github.com/mapbox/mapbox-common-ios.git", .exact("23.3.0-rc.1")),
.package(name: "MapboxCommon", url: "https://github.com/mapbox/mapbox-common-ios.git", .exact("23.3.1")),
.package(name: "Turf", url: "https://github.com/mapbox/turf-swift.git", from: "2.0.0"),
.package(name: "CocoaImageHashing", url: "https://github.com/ameingast/cocoaimagehashing", .exact("1.9.0"))
],
Expand Down
11 changes: 10 additions & 1 deletion Sources/MapboxMaps/Foundation/Extensions/Bundle+MapboxMaps.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ extension Bundle {
#if SWIFT_PACKAGE
return Bundle.module
#else
return Bundle(for: BundleLocator.self)
// When using frameworks this bundle will be our `.framework` bundle.
// When using static linking this bundle will be the the host application's `.app` bundle.
let bundle = Bundle(for: BundleLocator.self)

// When using CocoaPods a "resource bundle" will be used to avoid resource conflicts with the host application.
// Check for the existence of the resource bundle and use that instead if it is present.
let resourceBundle = bundle.path(forResource: "MapboxMapsResources", ofType: "bundle")
.flatMap(Bundle.init(path:))

return resourceBundle ?? bundle
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/MapboxMaps/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
<key>CFBundleShortVersionString</key>
<string>10.11.0</string>
<key>CFBundleVersion</key>
<string>62</string>
<string>63</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Sources/MapboxMaps/MapboxMaps.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version" : "10.11.0-rc.1-private"
"version" : "10.11.0-private"
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ final class FillExtrusionLayerIntegrationTests: MapViewIntegrationTestCase {
layer.fillExtrusionOpacity = Value<Double>.testConstantValue()
layer.fillExtrusionOpacityTransition = StyleTransition(duration: 10.0, delay: 10.0)
layer.fillExtrusionPattern = Value<ResolvedImage>.testConstantValue()
layer.fillExtrusionPatternTransition = StyleTransition(duration: 10.0, delay: 10.0)
layer.fillExtrusionRoundedRoof = Value<Bool>.testConstantValue()
layer.fillExtrusionTranslateTransition = StyleTransition(duration: 10.0, delay: 10.0)
layer.fillExtrusionTranslateAnchor = Value<FillExtrusionTranslateAnchor>.testConstantValue()
Expand Down
23 changes: 23 additions & 0 deletions scripts/license/LICENSE-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
changequote("""","""")dnl # prevents m4 from being confused with backquotes by changing quotes to non-existent tokens
## License

Mapbox Maps for iOS version __MAPS_SDK_VERSION__
Mapbox Maps iOS SDK

Copyright &copy; 2021 - __YEAR__ Mapbox, Inc. All rights reserved.

The software and files in this repository (collectively, “Software”) are licensed under the Mapbox TOS for use only with the relevant Mapbox product(s) listed at www.mapbox.com/pricing. This license allows developers with a current active Mapbox account to use and modify the authorized portions of the Software as needed for use only with the relevant Mapbox product(s) through their Mapbox account in accordance with the Mapbox TOS. This license terminates automatically if a developer no longer has a Mapbox account in good standing or breaches the Mapbox TOS. For the license terms, please see the Mapbox TOS at https://www.mapbox.com/legal/tos/ which incorporates the Mapbox Product Terms at www.mapbox.com/legal/service-terms. If this Software is a SDK, modifications that change or interfere with marked portions of the code related to billing, accounting, or data collection are not authorized and the SDK sends limited de-identified location and usage data which is used in accordance with the Mapbox TOS. [Updated 2023-01]

## Acknowledgements

This application makes use of the following third party libraries:

### turf-swift, https://github.com/mapbox/turf-swift

```
__TURF_LICENSE_CONTENT__
```

---

__CORE_LICENSE__
20 changes: 20 additions & 0 deletions scripts/license/generate-license.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

if [ -z "${GITHUB_TOKEN}" ]; then
echo "This script requires GITHUB_TOKEN variable to be set."
exit 1
fi

COREMAPS_VERSION=$(jq -r .MapboxCoreMaps scripts/release/packager/versions.json)
TURF_VERSION=$(jq -r .Turf scripts/release/packager/versions.json)
MAPS_SDK_VERSION=$(jq -r .version Sources/MapboxMaps/MapboxMaps.json)
CURRENT_YEAR=$(date +%Y)

TURF_LICENSE_CONTENT=$(gh api -H "Accept: application/vnd.github+json" "/repos/mapbox/turf-swift/contents/LICENSE.md?ref=$TURF_VERSION" --jq ".content" | base64 --decode)
CORE_LICENSE=$(gh api -H "Accept: application/vnd.github+json" "/repos/mapbox/mapbox-gl-native-internal/contents/LICENSE-iOS.md?ref=maps-v$COREMAPS_VERSION" --jq ".content" | base64 --decode)

m4 -D __MAPS_SDK_VERSION__="$MAPS_SDK_VERSION" \
-D __TURF_LICENSE_CONTENT__="$TURF_LICENSE_CONTENT" \
-D __CORE_LICENSE__="$CORE_LICENSE" \
-D __YEAR__="$CURRENT_YEAR" \
scripts/license/LICENSE-template.md
4 changes: 2 additions & 2 deletions scripts/release/packager/versions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"MapboxCoreMaps": "10.11.0-rc.1",
"MapboxCoreMaps": "10.11.1",
"MapboxMobileEvents": "v1.0.10",
"MapboxCommon": "23.3.0-rc.1",
"MapboxCommon": "23.3.1",
"Turf": "v2.6.1"
}

0 comments on commit ef7678f

Please sign in to comment.