summaryrefslogtreecommitdiff
path: root/platform/ios/scripts/publish.sh
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/scripts/publish.sh')
-rwxr-xr-xplatform/ios/scripts/publish.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/platform/ios/scripts/publish.sh b/platform/ios/scripts/publish.sh
new file mode 100755
index 0000000000..c914fcaccd
--- /dev/null
+++ b/platform/ios/scripts/publish.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+set -e
+set -o pipefail
+set -u
+
+#
+# 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`.
+#
+PUBLISH_VERSION="$1"
+
+if [[ ${#} -eq 2 ]]; then
+ PUBLISH_STYLE="-$2"
+else
+ PUBLISH_STYLE=""
+fi
+
+#
+# zip
+#
+cd build/ios/pkg/static
+ZIP=mapbox-ios-sdk-${PUBLISH_VERSION}${PUBLISH_STYLE}.zip
+rm -f ../${ZIP}
+zip -r ../${ZIP} *
+#
+# upload
+#
+REPO_NAME=$(basename $TRAVIS_REPO_SLUG)
+aws s3 cp ../${ZIP} s3://mapbox/$REPO_NAME/ios/builds/ --acl public-read > /dev/null
+echo http://mapbox.s3.amazonaws.com/$REPO_NAME/ios/builds/${ZIP}