summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmkiley <jordan.kiley@mapbox.com>2018-11-29 12:19:57 -0800
committerjmkiley <jordan.kiley@mapbox.com>2018-11-29 12:19:57 -0800
commit2d11540ded44a142aaca4f45b4b4ef8711c2d592 (patch)
tree0a25af5d41d26e659008553ff5f54695b9387595
parentfc664d2d2682d46a6ad9e7df60b6a3af6834b0be (diff)
downloadqtlocation-mapboxgl-2d11540ded44a142aaca4f45b4b4ef8711c2d592.tar.gz
[ios] update deploy-packages
-rwxr-xr-xplatform/ios/scripts/deploy-packages.sh151
-rwxr-xr-xplatform/ios/scripts/publish-cn.sh2
2 files changed, 76 insertions, 77 deletions
diff --git a/platform/ios/scripts/deploy-packages.sh b/platform/ios/scripts/deploy-packages.sh
index 01c666db34..88feb0cf1e 100755
--- a/platform/ios/scripts/deploy-packages.sh
+++ b/platform/ios/scripts/deploy-packages.sh
@@ -30,86 +30,85 @@ buildPackageStyle() {
local file_name=""
if [ -z ${style} ]
then
- ./platform/ios/scripts/publish.sh "${PUBLISH_VERSION}"
+ ./platform/ios/scripts/publish-cn.sh "${PUBLISH_VERSION}"
file_name=mapbox-ios-sdk-${PUBLISH_VERSION}.zip
else
- ./platform/ios/scripts/publish.sh "${PUBLISH_VERSION}" ${style}
+ ./platform/ios/scripts/publish-cn.sh "${PUBLISH_VERSION}" ${style}
file_name=mapbox-ios-sdk-${PUBLISH_VERSION}-${style}.zip
fi
- step "Downloading ${file_name} from s3 to ${BINARY_DIRECTORY}"
- wget -O ${BINARY_DIRECTORY}/${file_name} http://mapbox.s3.amazonaws.com/mapbox-gl-native/ios/builds/${file_name}
- if [[ "${GITHUB_RELEASE}" == true ]]; then
- step "Uploading ${file_name} to GitHub"
- github-release upload \
- --tag "ios-v${PUBLISH_VERSION}" \
- --name ${file_name} \
- --file "${BINARY_DIRECTORY}/${file_name}" > /dev/null
- fi
-}
-
-export TRAVIS_REPO_SLUG=mapbox-gl-native
-export GITHUB_USER=mapbox
-export GITHUB_REPO=mapbox-gl-native
-export BUILDTYPE=Release
-
-VERSION_TAG=${VERSION_TAG:-''}
-PUBLISH_VERSION=
-BINARY_DIRECTORY=${BINARY_DIRECTORY:-build/ios/deploy}
-GITHUB_RELEASE=${GITHUB_RELEASE:-true}
-PUBLISH_PRE_FLAG=''
-
-if [[ -z `which github-release` ]]; then
- step "Installing github-release…"
- brew install github-release
- if [ -z `which github-release` ]; then
- echo "Unable to install github-release. See: https://github.com/aktau/github-release"
- exit 1
- fi
-fi
-
-if [[ ${GITHUB_RELEASE} = "true" ]]; then
- GITHUB_RELEASE=true # Assign bool, not just a string
-fi
-
-if [[ -z ${VERSION_TAG} ]]; then
- step "Determining version number from most recent relevant git tag…"
- VERSION_TAG=$( git describe --tags --match=ios-v*.*.* --abbrev=0 )
- echo "Found tag: ${VERSION_TAG}"
-fi
-
-if [[ $( echo ${VERSION_TAG} | grep --invert-match ios-v ) ]]; then
- echo "Error: ${VERSION_TAG} is not a valid iOS version tag"
- echo "VERSION_TAG should be in format: ios-vX.X.X-pre.X"
- exit 1
-fi
-
-if github-release info --tag ${VERSION_TAG} | grep --quiet "draft: ✗"; then
- echo "Error: ${VERSION_TAG} has already been published on GitHub"
- echo "See: https://github.com/${GITHUB_USER}/${GITHUB_REPO}/releases/tag/${VERSION_TAG}"
- exit 1
-fi
-
-PUBLISH_VERSION=$( echo ${VERSION_TAG} | sed 's/^ios-v//' )
-git checkout ${VERSION_TAG}
-
-step "Deploying version ${PUBLISH_VERSION}…"
-
-make clean && make distclean
-npm install --ignore-scripts
-mkdir -p ${BINARY_DIRECTORY}
-
-if [[ "${GITHUB_RELEASE}" == true ]]; then
- step "Create GitHub release…"
- if [[ $( echo ${PUBLISH_VERSION} | awk '/[0-9]-/' ) ]]; then
- PUBLISH_PRE_FLAG='--pre-release'
- fi
- RELEASE_NOTES=$( ./platform/ios/scripts/release-notes.js github )
- github-release release \
- --tag "ios-v${PUBLISH_VERSION}" \
- --name "ios-v${PUBLISH_VERSION}" \
- --draft ${PUBLISH_PRE_FLAG} \
- --description "${RELEASE_NOTES}"
-fi
+# step "Downloading ${file_name} from s3 to ${BINARY_DIRECTORY}"
+# if [[ "${GITHUB_RELEASE}" == true ]]; then
+# step "Uploading ${file_name} to GitHub"
+# github-release upload \
+# --tag "ios-v${PUBLISH_VERSION}" \
+# --name ${file_name} \
+# --file "${BINARY_DIRECTORY}/${file_name}" > /dev/null
+# fi
+# }
+#
+# export TRAVIS_REPO_SLUG=mapbox-gl-native
+# export GITHUB_USER=mapbox
+# export GITHUB_REPO=mapbox-gl-native
+# export BUILDTYPE=Release
+#
+# VERSION_TAG=${VERSION_TAG:-''}
+# PUBLISH_VERSION=
+# BINARY_DIRECTORY=${BINARY_DIRECTORY:-build/ios/deploy}
+# GITHUB_RELEASE=${GITHUB_RELEASE:-false}
+# PUBLISH_PRE_FLAG=''
+#
+# if [[ -z `which github-release` ]]; then
+# step "Installing github-release…"
+# brew install github-release
+# if [ -z `which github-release` ]; then
+# echo "Unable to install github-release. See: https://github.com/aktau/github-release"
+# exit 1
+# fi
+# fi
+#
+# if [[ ${GITHUB_RELEASE} = "true" ]]; then
+# GITHUB_RELEASE=true # Assign bool, not just a string
+# fi
+#
+# if [[ -z ${VERSION_TAG} ]]; then
+# step "Determining version number from most recent relevant git tag…"
+# VERSION_TAG=$( git describe --tags --match=ios-v*.*.* --abbrev=0 )
+# echo "Found tag: ${VERSION_TAG}"
+# fi
+#
+# if [[ $( echo ${VERSION_TAG} | grep --invert-match ios-v ) ]]; then
+# echo "Error: ${VERSION_TAG} is not a valid iOS version tag"
+# echo "VERSION_TAG should be in format: ios-vX.X.X-pre.X"
+# exit 1
+# fi
+#
+# if github-release info --tag ${VERSION_TAG} | grep --quiet "draft: ✗"; then
+# echo "Error: ${VERSION_TAG} has already been published on GitHub"
+# echo "See: https://github.com/${GITHUB_USER}/${GITHUB_REPO}/releases/tag/${VERSION_TAG}"
+# exit 1
+# fi
+#
+# PUBLISH_VERSION=$( echo ${VERSION_TAG} | sed 's/^ios-v//' )
+# git checkout ${VERSION_TAG}
+#
+# step "Deploying version ${PUBLISH_VERSION}…"
+#
+# make clean && make distclean
+# npm install --ignore-scripts
+# mkdir -p ${BINARY_DIRECTORY}
+#
+# if [[ "${GITHUB_RELEASE}" == true ]]; then
+# step "Create GitHub release…"
+# if [[ $( echo ${PUBLISH_VERSION} | awk '/[0-9]-/' ) ]]; then
+# PUBLISH_PRE_FLAG='--pre-release'
+# fi
+# RELEASE_NOTES=$( ./platform/ios/scripts/release-notes.js github )
+# github-release release \
+# --tag "ios-v${PUBLISH_VERSION}" \
+# --name "ios-v${PUBLISH_VERSION}" \
+# --draft ${PUBLISH_PRE_FLAG} \
+# --description "${RELEASE_NOTES}"
+# fi
buildPackageStyle "iframework" "symbols-dynamic"
buildPackageStyle "iframework SYMBOLS=NO" "dynamic"
diff --git a/platform/ios/scripts/publish-cn.sh b/platform/ios/scripts/publish-cn.sh
index b340a1b217..f664042445 100755
--- a/platform/ios/scripts/publish-cn.sh
+++ b/platform/ios/scripts/publish-cn.sh
@@ -24,7 +24,7 @@ echo "finished!"
# zip
#
cd build/ios/pkg
-ZIP="mapbox-ios-sdk-4.5.0-cn.1.zip"
+ZIP="mapbox-ios-sdk-${PUBLISH_VERSION}.zip"
step "Compressing ${ZIP}…"
rm -f ../${ZIP}
zip -yr ../${ZIP} *