summaryrefslogtreecommitdiff
path: root/scripts/ios/publish.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ios/publish.sh')
-rwxr-xr-xscripts/ios/publish.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/ios/publish.sh b/scripts/ios/publish.sh
new file mode 100755
index 0000000000..f65f3e5609
--- /dev/null
+++ b/scripts/ios/publish.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+set -e
+set -o pipefail
+set -u
+
+#
+# iOS release tag format is `ios-vX.Y.Z`; `X.Y.Z` gets passed in
+#
+PUBLISH_VERSION="$1"
+
+#
+# zip
+#
+cd build/ios/pkg/static
+ZIP=mapbox-gl-ios-${PUBLISH_VERSION}.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}