summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Kiley <jmkiley@users.noreply.github.com>2018-12-06 16:29:48 -0800
committerGitHub <noreply@github.com>2018-12-06 16:29:48 -0800
commit177c0473165aacb26bea9efb6441ab99756c218a (patch)
treef2f95d2dcd342389200e280b20942cb2ee261e46
parentfc664d2d2682d46a6ad9e7df60b6a3af6834b0be (diff)
downloadqtlocation-mapboxgl-177c0473165aacb26bea9efb6441ab99756c218a.tar.gz
[ios] Release iOS 8-compatible branch via CircleCI (#13480)ios-v4.5.0-cn.1
-rw-r--r--circle.yml3
-rw-r--r--platform/ios/scripts/deploy-packages-cn.sh51
-rwxr-xr-xplatform/ios/scripts/publish-cn.sh14
3 files changed, 65 insertions, 3 deletions
diff --git a/circle.yml b/circle.yml
index 087418de3d..efdd07aaa9 100644
--- a/circle.yml
+++ b/circle.yml
@@ -972,8 +972,7 @@ jobs:
name: Build, package, and upload iOS release
command: |
export VERSION_TAG=${CIRCLE_TAG}
- export GITHUB_TOKEN=${DANGER_GITHUB_API_TOKEN}
- platform/ios/scripts/deploy-packages.sh
+ platform/ios/scripts/deploy-packages-cn.sh
- save-dependencies
- collect-xcode-build-logs
- upload-xcode-build-logs
diff --git a/platform/ios/scripts/deploy-packages-cn.sh b/platform/ios/scripts/deploy-packages-cn.sh
new file mode 100644
index 0000000000..82894ae746
--- /dev/null
+++ b/platform/ios/scripts/deploy-packages-cn.sh
@@ -0,0 +1,51 @@
+#!/usr/bin/env bash
+
+set -e
+set -o pipefail
+set -u
+
+# dynamic environment variables:
+# VERSION_TAG={determined automatically}: Version tag in format ios-vX.X.X-pre.X
+# GITHUB_RELEASE=true: Upload to github
+# BINARY_DIRECTORY=build/ios/deploy: Directory in which to save test packages
+
+# environment variables and dependencies:
+# - You must run "mbx auth ..." before running
+# - Set GITHUB_TOKEN to a GitHub API access token in your environment to use GITHUB_RELEASE
+# - "wget" is required for downloading the zip files from s3
+# - The "github-release" command is required to use GITHUB_RELEASE
+
+function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; }
+function finish { >&2 echo -en "\033[0m"; }
+trap finish EXIT
+
+buildPackageStyle() {
+ local package=$1 style=""
+ if [[ ${#} -eq 2 ]]; then
+ style="$2"
+ fi
+ step "Building: make ${package} ${style}"
+ make ${package}
+ step "Publishing ${package} with ${style}"
+ local file_name=""
+ if [ -z ${style} ]
+ then
+ ./platform/ios/scripts/publish-cn.sh "${PUBLISH_VERSION}"
+ file_name=mapbox-ios-sdk-${PUBLISH_VERSION}.zip
+ else
+ ./platform/ios/scripts/publish-cn.sh "${PUBLISH_VERSION}" ${style}
+ file_name=mapbox-ios-sdk-${PUBLISH_VERSION}-${style}.zip
+ fi
+PUBLISH_VERSION=$( echo ${VERSION_TAG} | sed 's/^ios-v//' )
+git checkout ${VERSION_TAG}
+
+step "Deploying version ${PUBLISH_VERSION}…"
+#
+make clean && make distclean
+npm install --ignore-scripts
+mkdir -p ${BINARY_DIRECTORY}
+
+buildPackageStyle "iframework" "symbols-dynamic"
+buildPackageStyle "iframework SYMBOLS=NO" "dynamic"
+
+step "Finished deploying ${PUBLISH_VERSION} in $(($SECONDS / 60)) minutes and $(($SECONDS % 60)) seconds"
diff --git a/platform/ios/scripts/publish-cn.sh b/platform/ios/scripts/publish-cn.sh
index b340a1b217..a0cbdca02c 100755
--- a/platform/ios/scripts/publish-cn.sh
+++ b/platform/ios/scripts/publish-cn.sh
@@ -10,6 +10,18 @@ function finish { >&2 echo -en "\033[0m"; }
trap finish EXIT
#
+# iOS 8-compatible release tag format is `vX.Y.Z-cn.1`; `X.Y.Z-cn.1` gets passed in
+# In the case of symbolicated builds, we also append the `-symbols`.
+#
+PUBLISH_VERSION="$1"
+
+if [[ ${#} -eq 2 ]]; then
+ PUBLISH_STYLE="-$2"
+else
+ PUBLISH_STYLE=""
+fi
+
+#
# make the framework
#
@@ -24,7 +36,7 @@ echo "finished!"
# zip
#
cd build/ios/pkg
-ZIP="mapbox-ios-sdk-4.5.0-cn.1.zip"
+ZIP="mapbox-ios-sdk-${PUBLISH_VERSION}.zip"
step "Compressing ${ZIP}…"
rm -f ../${ZIP}
zip -yr ../${ZIP} *