From 113179cddd76cf5ed325262b094fc3ea6bd2c201 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Mon, 4 Mar 2019 17:48:36 -0800 Subject: [build, ios] Replace 'nightly' build with snapshot --- platform/ios/INSTALL.md | 20 +++++++++---- .../ios/Mapbox-iOS-SDK-nightly-dynamic.podspec | 32 -------------------- .../ios/Mapbox-iOS-SDK-snapshot-dynamic.podspec | 32 ++++++++++++++++++++ platform/ios/scripts/deploy-nightly.sh | 20 ------------- platform/ios/scripts/deploy-snapshot.sh | 17 +++++++++++ platform/ios/scripts/publish.sh | 35 +++++++++++----------- platform/macos/scripts/deploy-packages.sh | 1 - 7 files changed, 80 insertions(+), 77 deletions(-) delete mode 100644 platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec create mode 100644 platform/ios/Mapbox-iOS-SDK-snapshot-dynamic.podspec delete mode 100755 platform/ios/scripts/deploy-nightly.sh create mode 100755 platform/ios/scripts/deploy-snapshot.sh (limited to 'platform') diff --git a/platform/ios/INSTALL.md b/platform/ios/INSTALL.md index d7576b68cb..eee75b9993 100644 --- a/platform/ios/INSTALL.md +++ b/platform/ios/INSTALL.md @@ -73,9 +73,9 @@ bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mapbox.framework/strip-fra (The last step, courtesy of [Realm](https://github.com/realm/realm-cocoa/), is required for working around an [iOS App Store bug](http://www.openradar.me/radar?id=6409498411401216) when archiving universal binaries.) -##### Nightly builds +##### Snapshot builds -A nightly build of the dynamic framework, based on the master branch, is available for download [here](https://mapbox.s3.amazonaws.com/mapbox-gl-native/ios/builds/mapbox-ios-sdk-nightly-dynamic.zip). +A snapshot build of the dynamic framework, based on the latest commit to the master branch, is available for download [here](https://mapbox.s3.amazonaws.com/mapbox-gl-native/ios/builds/mapbox-ios-sdk-snapshot-dynamic.zip). #### Static framework @@ -114,12 +114,12 @@ To test pre-releases of the dynamic framework, directly specify the version in y pod 'Mapbox-iOS-SDK', '~> x.x.x-alpha.1' ``` -##### Testing nightly releases with CocoaPods +##### Testing snapshot releases with CocoaPods -To test a nightly dynamic framework build, update your app’s `Podfile` to point to: +To test a snapshot dynamic framework build, update your app’s `Podfile` to point to: ```rb -pod 'Mapbox-iOS-SDK-nightly-dynamic', podspec: 'https://raw.githubusercontent.com/mapbox/mapbox-gl-native/master/platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec' +pod 'Mapbox-iOS-SDK-snapshot-dynamic', podspec: 'https://raw.githubusercontent.com/mapbox/mapbox-gl-native/master/platform/ios/Mapbox-iOS-SDK-snapshot-dynamic.podspec' ``` ##### Using your own build with CocoaPods @@ -148,7 +148,7 @@ Note that these builds lack some debugging information, which could make develop #### Carthage -For instructions on installing stable release versions of the Mapbox Maps SDK for iOS with Carthage, see [our website](https://www.mapbox.com/install/ios/carthage/). If you require a build with debug symbols pre-stripped, use [this feed URL](https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK-stripped.json) with Carthage. +For instructions on installing stable release versions of the Mapbox Maps SDK for iOS with Carthage, see [our website](https://www.mapbox.com/install/ios/carthage/). ##### Testing pre-releases with Carthage @@ -158,10 +158,18 @@ To test pre-releases of the dynamic framework, directly specify the version in y binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" ~> x.x.x-alpha.1 ``` +##### Testing snapshot releases with Carthage + +This project does not currently support using snapshot releases via Carthage. + ##### Using your own build with Carthage This project does not support being compiled as a local repository by Carthage. +##### Using pre-stripped releases with Carthage + +If you require a build with debug symbols pre-stripped, use [this feed URL](https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK-stripped.json) with Carthage. + ### Configuration 1. Mapbox vector tiles require a Mapbox account and API access token. In the project editor, select the application target, then go to the Info tab. Under the “Custom iOS Target Properties” section, set `MGLMapboxAccessToken` to your access token. You can obtain an access token from the [Mapbox account page](https://www.mapbox.com/studio/account/tokens/). diff --git a/platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec b/platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec deleted file mode 100644 index 736a797e8c..0000000000 --- a/platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec +++ /dev/null @@ -1,32 +0,0 @@ -Pod::Spec.new do |m| - - version = '4.9.0' - - m.name = 'Mapbox-iOS-SDK-nightly-dynamic' - m.version = "#{version}-nightly" - - m.summary = 'Open source vector map solution for iOS with full styling capabilities.' - m.description = 'Open source, OpenGL-based vector map solution for iOS with full styling capabilities and Cocoa Touch APIs.' - m.homepage = 'https://docs.mapbox.com/ios/maps/' - m.license = { :type => 'BSD', :file => 'LICENSE.md' } - m.author = { 'Mapbox' => 'mobile@mapbox.com' } - m.screenshot = "https://docs.mapbox.com/ios/api/maps/#{version}/img/screenshot.png" - m.social_media_url = 'https://twitter.com/mapbox' - m.documentation_url = 'https://docs.mapbox.com/ios/api/maps/' - - m.source = { - :http => "https://mapbox.s3.amazonaws.com/mapbox-gl-native/ios/builds/mapbox-ios-sdk-nightly-dynamic.zip", - :flatten => true - } - - m.platform = :ios - m.ios.deployment_target = '9.0' - - m.requires_arc = true - - m.vendored_frameworks = 'dynamic/Mapbox.framework' - m.module_name = 'Mapbox' - - m.preserve_path = '**/*.bcsymbolmap' - -end diff --git a/platform/ios/Mapbox-iOS-SDK-snapshot-dynamic.podspec b/platform/ios/Mapbox-iOS-SDK-snapshot-dynamic.podspec new file mode 100644 index 0000000000..56cdc8f67e --- /dev/null +++ b/platform/ios/Mapbox-iOS-SDK-snapshot-dynamic.podspec @@ -0,0 +1,32 @@ +Pod::Spec.new do |m| + + version = '4.9.0' + + m.name = 'Mapbox-iOS-SDK-snapshot-dynamic' + m.version = "#{version}-snapshot" + + m.summary = 'Open source vector map solution for iOS with full styling capabilities.' + m.description = 'Open source, OpenGL-based vector map solution for iOS with full styling capabilities and Cocoa Touch APIs.' + m.homepage = 'https://docs.mapbox.com/ios/maps/' + m.license = { :type => 'BSD', :file => 'LICENSE.md' } + m.author = { 'Mapbox' => 'mobile@mapbox.com' } + m.screenshot = "https://docs.mapbox.com/ios/api/maps/#{version}/img/screenshot.png" + m.social_media_url = 'https://twitter.com/mapbox' + m.documentation_url = 'https://docs.mapbox.com/ios/api/maps/' + + m.source = { + :http => "https://mapbox.s3.amazonaws.com/mapbox-gl-native/ios/builds/mapbox-ios-sdk-snapshot-dynamic.zip", + :flatten => true + } + + m.platform = :ios + m.ios.deployment_target = '9.0' + + m.requires_arc = true + + m.vendored_frameworks = 'dynamic/Mapbox.framework' + m.module_name = 'Mapbox' + + m.preserve_path = '**/*.bcsymbolmap' + +end diff --git a/platform/ios/scripts/deploy-nightly.sh b/platform/ios/scripts/deploy-nightly.sh deleted file mode 100755 index 9fec4df58a..0000000000 --- a/platform/ios/scripts/deploy-nightly.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -o pipefail -set -u - -function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; } -function finish { >&2 echo -en "\033[0m"; } -trap finish EXIT - -export TRAVIS_REPO_SLUG=mapbox-gl-native - -DATE=`date +%Y-%m-%d` -NIGHTLY_TYPE="nightly-dynamic" - -step "Uploading ${NIGHTLY_TYPE} build for ${DATE} to s3…" - -./platform/ios/scripts/publish.sh "${NIGHTLY_TYPE}" "${DATE}" - -step "Finished deploying ${NIGHTLY_TYPE} build in $(($SECONDS / 60)) minutes and $(($SECONDS % 60)) seconds" diff --git a/platform/ios/scripts/deploy-snapshot.sh b/platform/ios/scripts/deploy-snapshot.sh new file mode 100755 index 0000000000..d0d5d59d2e --- /dev/null +++ b/platform/ios/scripts/deploy-snapshot.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail + +function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; } +function finish { >&2 echo -en "\033[0m"; } +trap finish EXIT + +DATE=`date +%Y-%m-%d` +PROJ_VERSION=$(git rev-list --count HEAD) +SNAPSHOT_TYPE="snapshot-dynamic" + +step "Uploading ${SNAPSHOT_TYPE} build for ${DATE}-${PROJ_VERSION} to s3…" + +./platform/ios/scripts/publish.sh "${SNAPSHOT_TYPE}" "${DATE}-${PROJ_VERSION}" + +step "Finished deploying ${SNAPSHOT_TYPE} build in $(($SECONDS / 60)) minutes and $(($SECONDS % 60)) seconds" diff --git a/platform/ios/scripts/publish.sh b/platform/ios/scripts/publish.sh index 4ef0bd49e7..b4e6f30257 100755 --- a/platform/ios/scripts/publish.sh +++ b/platform/ios/scripts/publish.sh @@ -1,8 +1,6 @@ #!/usr/bin/env bash -set -e -set -o pipefail -set -u +set -euo pipefail function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; } function finish { >&2 echo -en "\033[0m"; } @@ -10,7 +8,7 @@ trap finish EXIT # # iOS release tag format is `vX.Y.Z`; `X.Y.Z` gets passed in -# In the case of symbolicated builds, we also append the `-symbols`. +# In the case of stripped builds, we also append the `-stripped`. # PUBLISH_VERSION="$1" @@ -20,20 +18,22 @@ else PUBLISH_STYLE="" fi +GITHUB_REPO=${GITHUB_REPO:-'mapbox-gl-native'} + # # zip # cd build/ios/pkg -ZIP="mapbox-ios-sdk-${PUBLISH_VERSION}${PUBLISH_STYLE}.zip" -step "Compressing ${ZIP}…" -rm -f ../${ZIP} -zip -yr ../${ZIP} * +SNAPSHOT_FILENAME="mapbox-ios-sdk-${PUBLISH_VERSION}${PUBLISH_STYLE}.zip" +step "Compressing ${SNAPSHOT_FILENAME}…" +rm -f ../${SNAPSHOT_FILENAME} +zip -yr ../${SNAPSHOT_FILENAME} * # # report file sizes # step "Echoing file sizes…" -du -sh ../${ZIP} +du -sh ../${SNAPSHOT_FILENAME} du -sch * du -sch dynamic/* @@ -45,18 +45,17 @@ if [ -n "${CI:-}" ]; then PROGRESS="--no-progress" fi -step "Uploading ${ZIP} to s3…" -REPO_NAME=$(basename $TRAVIS_REPO_SLUG) -aws s3 cp ../${ZIP} s3://mapbox/$REPO_NAME/ios/builds/ --acl public-read ${PROGRESS} -echo "URL: https://mapbox.s3.amazonaws.com/$REPO_NAME/ios/builds/${ZIP}" +step "Uploading ${SNAPSHOT_FILENAME} to s3…" +aws s3 cp ../${SNAPSHOT_FILENAME} s3://mapbox/$GITHUB_REPO/ios/builds/ --acl public-read ${PROGRESS} +echo "URL: https://mapbox.s3.amazonaws.com/$GITHUB_REPO/ios/builds/${SNAPSHOT_FILENAME}" # -# upload & update nightly +# upload & update snapshot # -if [[ ${PUBLISH_VERSION} =~ "nightly" ]]; then +if [[ ${PUBLISH_VERSION} =~ "snapshot" ]]; then step "Updating ${PUBLISH_VERSION} to ${PUBLISH_STYLE}…" - GENERIC_NIGHTLY_FILENAME="mapbox-ios-sdk-${PUBLISH_VERSION}.zip" + GENERIC_SNAPSHOT_FILENAME="mapbox-ios-sdk-${PUBLISH_VERSION}.zip" aws s3 cp \ - s3://mapbox/$REPO_NAME/ios/builds/${ZIP} \ - s3://mapbox/$REPO_NAME/ios/builds/${GENERIC_NIGHTLY_FILENAME} --acl public-read ${PROGRESS} + s3://mapbox/$GITHUB_REPO/ios/builds/${SNAPSHOT_FILENAME} \ + s3://mapbox/$GITHUB_REPO/ios/builds/${GENERIC_SNAPSHOT_FILENAME} --acl public-read ${PROGRESS} fi diff --git a/platform/macos/scripts/deploy-packages.sh b/platform/macos/scripts/deploy-packages.sh index 0d053aef4b..bb90f3a8b0 100755 --- a/platform/macos/scripts/deploy-packages.sh +++ b/platform/macos/scripts/deploy-packages.sh @@ -74,7 +74,6 @@ publish() { fi } -export TRAVIS_REPO_SLUG=mapbox-gl-native export GITHUB_USER=mapbox export GITHUB_REPO=mapbox-gl-native export BUILDTYPE=Release -- cgit v1.2.1