Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[ios, build] Change version checker URL to ios-sdk site #8468

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions platform/ios/scripts/deploy-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,6 @@ buildPackageStyle() {
fi
}

bumpVersionForUpdateChecker() {
if [[ $( echo ${PUBLISH_VERSION} | awk '/[0-9]-/' ) ]]; then
step "Skipping version checker bump because this is a pre-release"
return
fi

step "Updating version checker to ${PUBLISH_VERSION}…"

CHECKER_FILENAME="latest_version"
CHECKER_PATH=${BINARY_DIRECTORY}/${CHECKER_FILENAME}

echo ${PUBLISH_VERSION} > ${CHECKER_PATH}
aws s3 cp ${CHECKER_PATH} s3://mapbox/${GITHUB_REPO}/ios/${CHECKER_FILENAME} --acl public-read --content-type text/plain

verification=$( curl -L http://mapbox.s3.amazonaws.com/${GITHUB_REPO}/ios/${CHECKER_FILENAME} )
echo "Updated version checker to ${verification}"
}

export TRAVIS_REPO_SLUG=mapbox-gl-native
export GITHUB_USER=mapbox
export GITHUB_REPO=mapbox-gl-native
Expand Down Expand Up @@ -132,6 +114,4 @@ buildPackageStyle "iframework" "symbols-dynamic"
buildPackageStyle "iframework SYMBOLS=NO" "dynamic"
buildPackageStyle "ifabric" "fabric"

bumpVersionForUpdateChecker

step "Finished deploying ${PUBLISH_VERSION} in $(($SECONDS / 60)) minutes and $(($SECONDS % 60)) seconds"
2 changes: 1 addition & 1 deletion platform/ios/src/MGLSDKUpdateChecker.mm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ + (void)checkForUpdates {
return;
}

NSURL *url = [NSURL URLWithString:@"https://mapbox.s3.amazonaws.com/mapbox-gl-native/ios/latest_version"];
NSURL *url = [NSURL URLWithString:@"https://www.mapbox.com/ios-sdk/latest_version"];
[[NSURLSession.sharedSession dataTaskWithURL:url completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error || ((NSHTTPURLResponse *)response).statusCode != 200) {
return;
Expand Down