diff options
author | Jason Wray <jason@mapbox.com> | 2019-03-04 17:48:36 -0800 |
---|---|---|
committer | Jason Wray <friedbunny@users.noreply.github.com> | 2019-03-05 12:09:38 -0800 |
commit | 113179cddd76cf5ed325262b094fc3ea6bd2c201 (patch) | |
tree | 714c3eee37cd73793b6311dc7582966668180b70 /platform/ios/scripts | |
parent | 7e4824960cfb414a3485310998d5761ac7abdef7 (diff) | |
download | qtlocation-mapboxgl-113179cddd76cf5ed325262b094fc3ea6bd2c201.tar.gz |
[build, ios] Replace 'nightly' build with snapshot
Diffstat (limited to 'platform/ios/scripts')
-rwxr-xr-x | platform/ios/scripts/deploy-nightly.sh | 20 | ||||
-rwxr-xr-x | platform/ios/scripts/deploy-snapshot.sh | 17 | ||||
-rwxr-xr-x | platform/ios/scripts/publish.sh | 35 |
3 files changed, 34 insertions, 38 deletions
diff --git a/platform/ios/scripts/deploy-nightly.sh b/platform/ios/scripts/deploy-nightly.sh deleted file mode 100755 index 9fec4df58a..0000000000 --- a/platform/ios/scripts/deploy-nightly.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -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 - -export TRAVIS_REPO_SLUG=mapbox-gl-native - -DATE=`date +%Y-%m-%d` -NIGHTLY_TYPE="nightly-dynamic" - -step "Uploading ${NIGHTLY_TYPE} build for ${DATE} to s3…" - -./platform/ios/scripts/publish.sh "${NIGHTLY_TYPE}" "${DATE}" - -step "Finished deploying ${NIGHTLY_TYPE} build in $(($SECONDS / 60)) minutes and $(($SECONDS % 60)) seconds" diff --git a/platform/ios/scripts/deploy-snapshot.sh b/platform/ios/scripts/deploy-snapshot.sh new file mode 100755 index 0000000000..d0d5d59d2e --- /dev/null +++ b/platform/ios/scripts/deploy-snapshot.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail + +function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; } +function finish { >&2 echo -en "\033[0m"; } +trap finish EXIT + +DATE=`date +%Y-%m-%d` +PROJ_VERSION=$(git rev-list --count HEAD) +SNAPSHOT_TYPE="snapshot-dynamic" + +step "Uploading ${SNAPSHOT_TYPE} build for ${DATE}-${PROJ_VERSION} to s3…" + +./platform/ios/scripts/publish.sh "${SNAPSHOT_TYPE}" "${DATE}-${PROJ_VERSION}" + +step "Finished deploying ${SNAPSHOT_TYPE} build in $(($SECONDS / 60)) minutes and $(($SECONDS % 60)) seconds" diff --git a/platform/ios/scripts/publish.sh b/platform/ios/scripts/publish.sh index 4ef0bd49e7..b4e6f30257 100755 --- a/platform/ios/scripts/publish.sh +++ b/platform/ios/scripts/publish.sh @@ -1,8 +1,6 @@ #!/usr/bin/env bash -set -e -set -o pipefail -set -u +set -euo pipefail function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; } function finish { >&2 echo -en "\033[0m"; } @@ -10,7 +8,7 @@ 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`. +# In the case of stripped builds, we also append the `-stripped`. # PUBLISH_VERSION="$1" @@ -20,20 +18,22 @@ else PUBLISH_STYLE="" fi +GITHUB_REPO=${GITHUB_REPO:-'mapbox-gl-native'} + # # zip # cd build/ios/pkg -ZIP="mapbox-ios-sdk-${PUBLISH_VERSION}${PUBLISH_STYLE}.zip" -step "Compressing ${ZIP}…" -rm -f ../${ZIP} -zip -yr ../${ZIP} * +SNAPSHOT_FILENAME="mapbox-ios-sdk-${PUBLISH_VERSION}${PUBLISH_STYLE}.zip" +step "Compressing ${SNAPSHOT_FILENAME}…" +rm -f ../${SNAPSHOT_FILENAME} +zip -yr ../${SNAPSHOT_FILENAME} * # # report file sizes # step "Echoing file sizes…" -du -sh ../${ZIP} +du -sh ../${SNAPSHOT_FILENAME} du -sch * du -sch dynamic/* @@ -45,18 +45,17 @@ if [ -n "${CI:-}" ]; then PROGRESS="--no-progress" fi -step "Uploading ${ZIP} to s3…" -REPO_NAME=$(basename $TRAVIS_REPO_SLUG) -aws s3 cp ../${ZIP} s3://mapbox/$REPO_NAME/ios/builds/ --acl public-read ${PROGRESS} -echo "URL: https://mapbox.s3.amazonaws.com/$REPO_NAME/ios/builds/${ZIP}" +step "Uploading ${SNAPSHOT_FILENAME} to s3…" +aws s3 cp ../${SNAPSHOT_FILENAME} s3://mapbox/$GITHUB_REPO/ios/builds/ --acl public-read ${PROGRESS} +echo "URL: https://mapbox.s3.amazonaws.com/$GITHUB_REPO/ios/builds/${SNAPSHOT_FILENAME}" # -# upload & update nightly +# upload & update snapshot # -if [[ ${PUBLISH_VERSION} =~ "nightly" ]]; then +if [[ ${PUBLISH_VERSION} =~ "snapshot" ]]; then step "Updating ${PUBLISH_VERSION} to ${PUBLISH_STYLE}…" - GENERIC_NIGHTLY_FILENAME="mapbox-ios-sdk-${PUBLISH_VERSION}.zip" + GENERIC_SNAPSHOT_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 ${PROGRESS} + s3://mapbox/$GITHUB_REPO/ios/builds/${SNAPSHOT_FILENAME} \ + s3://mapbox/$GITHUB_REPO/ios/builds/${GENERIC_SNAPSHOT_FILENAME} --acl public-read ${PROGRESS} fi |