summaryrefslogtreecommitdiff
path: root/platform/ios/scripts/publish.sh
diff options
context:
space:
mode:
authorJason Wray <friedbunny@users.noreply.github.com>2016-10-05 20:29:17 -0400
committerGitHub <noreply@github.com>2016-10-05 20:29:17 -0400
commit8d221cafe0614e64bce0a7364ebee3529f6b5e80 (patch)
treea90c7c5c897649f2b993656ccc330680b893eb02 /platform/ios/scripts/publish.sh
parentc2333658f0e756c306fffafed713a5e3bd61155f (diff)
downloadqtlocation-mapboxgl-8d221cafe0614e64bce0a7364ebee3529f6b5e80.tar.gz
[ios] Deploy script enhancements (#6581)
* Add `make ideploy` command for publishing iOS releases. * Get release version from latest ios git tag. * Use caffeinate to prevent the system from sleeping during the deploy process. * Checkout tag to ensure correct commit is used * Fail if release has already been published (not a draft) on GitHub * Add publish step logging and colorize it. * Allow s3 upload to show progress. * Use build/ios/deploy directory for downloaded release zips; always overwrite via -O flag. * Add zip filename to s3 step. * Auto-install github-release command
Diffstat (limited to 'platform/ios/scripts/publish.sh')
-rwxr-xr-xplatform/ios/scripts/publish.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/platform/ios/scripts/publish.sh b/platform/ios/scripts/publish.sh
index bdfbc94314..e080ee825c 100755
--- a/platform/ios/scripts/publish.sh
+++ b/platform/ios/scripts/publish.sh
@@ -4,6 +4,10 @@ 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
+
#
# 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`.
@@ -21,11 +25,14 @@ fi
#
cd build/ios/pkg
ZIP=mapbox-ios-sdk-${PUBLISH_VERSION}${PUBLISH_STYLE}.zip
+step "Compressing ${ZIP}…"
rm -f ../${ZIP}
zip -r ../${ZIP} *
+
#
# upload
#
+step "Uploading ${ZIP} to s3…"
REPO_NAME=$(basename $TRAVIS_REPO_SLUG)
-aws s3 cp ../${ZIP} s3://mapbox/$REPO_NAME/ios/builds/ --acl public-read > /dev/null
+aws s3 cp ../${ZIP} s3://mapbox/$REPO_NAME/ios/builds/ --acl public-read
echo http://mapbox.s3.amazonaws.com/$REPO_NAME/ios/builds/${ZIP}