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.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/platform/ios/scripts/publish.sh b/platform/ios/scripts/publish.sh
index e080ee825c..2934e10217 100755
--- a/platform/ios/scripts/publish.sh
+++ b/platform/ios/scripts/publish.sh
@@ -24,7 +24,7 @@ fi
# zip
#
cd build/ios/pkg
-ZIP=mapbox-ios-sdk-${PUBLISH_VERSION}${PUBLISH_STYLE}.zip
+ZIP="mapbox-ios-sdk-${PUBLISH_VERSION}${PUBLISH_STYLE}.zip"
step "Compressing ${ZIP}…"
rm -f ../${ZIP}
zip -r ../${ZIP} *
@@ -35,4 +35,15 @@ zip -r ../${ZIP} *
step "Uploading ${ZIP} to s3…"
REPO_NAME=$(basename $TRAVIS_REPO_SLUG)
aws s3 cp ../${ZIP} s3://mapbox/$REPO_NAME/ios/builds/ --acl public-read
-echo http://mapbox.s3.amazonaws.com/$REPO_NAME/ios/builds/${ZIP}
+echo "URL: https://mapbox.s3.amazonaws.com/$REPO_NAME/ios/builds/${ZIP}"
+
+#
+# update nightly
+#
+if [[ ${PUBLISH_VERSION} =~ "nightly" ]]; then
+ step "Updating ${PUBLISH_VERSION} to ${PUBLISH_STYLE}…"
+ GENERIC_NIGHTLY_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
+fi