diff options
author | Jason Wray <jason@mapbox.com> | 2019-03-04 17:48:36 -0800 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2019-03-04 17:51:40 -0800 |
commit | 8c9b73e2349f183488a18f760387a479aa2233bd (patch) | |
tree | f13c32d82a4394f9cf5ef3f6585df1620662805f | |
parent | 05026b704adcbe97c923989b3e2e46feb4fdc7ee (diff) | |
download | qtlocation-mapboxgl-upstream/friedbunny-snapshotizes-the-nightly-build.tar.gz |
[build, ios] Replace 'nightly' build with snapshotupstream/friedbunny-snapshotizes-the-nightly-build
-rw-r--r-- | circle.yml | 8 | ||||
-rw-r--r-- | platform/ios/INSTALL.md | 20 | ||||
-rw-r--r-- | platform/ios/Mapbox-iOS-SDK-snapshot-dynamic.podspec (renamed from platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec) | 6 | ||||
-rwxr-xr-x | platform/ios/scripts/deploy-nightly.sh | 20 | ||||
-rwxr-xr-x | platform/ios/scripts/deploy-snapshot.sh | 17 | ||||
-rwxr-xr-x | platform/ios/scripts/publish.sh | 35 | ||||
-rwxr-xr-x | platform/macos/scripts/deploy-packages.sh | 1 |
7 files changed, 55 insertions, 52 deletions
diff --git a/circle.yml b/circle.yml index 2356c049cf..6e18ab71a8 100644 --- a/circle.yml +++ b/circle.yml @@ -449,7 +449,7 @@ commands: name: Send a Slack notification on nightly failure when: on_fail command: | - if [[ -z $CIRCLE_COMPARE_URL && $CIRCLE_BRANCH == master ]]; then + if [[ $CIRCLE_BRANCH == master ]]; then export SLACK_MESSAGE="Nightly build of \`$CIRCLE_JOB\` <$CIRCLE_BUILD_URL|failed>." export SLACK_COLOR="danger" scripts/notify-slack.sh @@ -957,10 +957,10 @@ jobs: command: make iframework no_output_timeout: 5m - deploy: - name: Upload nightly build to s3 + name: Upload snapshot build to s3 command: | - if [[ -z $CIRCLE_COMPARE_URL && $CIRCLE_BRANCH == master ]]; then - platform/ios/scripts/deploy-nightly.sh + if [[ $CIRCLE_BRANCH == master ]]; then + platform/ios/scripts/deploy-snapshot.sh fi - run: name: Record size 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-snapshot-dynamic.podspec index 736a797e8c..56cdc8f67e 100644 --- a/platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec +++ b/platform/ios/Mapbox-iOS-SDK-snapshot-dynamic.podspec @@ -2,8 +2,8 @@ Pod::Spec.new do |m| version = '4.9.0' - m.name = 'Mapbox-iOS-SDK-nightly-dynamic' - m.version = "#{version}-nightly" + 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.' @@ -15,7 +15,7 @@ Pod::Spec.new do |m| 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", + :http => "https://mapbox.s3.amazonaws.com/mapbox-gl-native/ios/builds/mapbox-ios-sdk-snapshot-dynamic.zip", :flatten => true } 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 |