summaryrefslogtreecommitdiff
path: root/platform/macos/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'platform/macos/scripts')
-rwxr-xr-xplatform/macos/scripts/deploy-packages.sh15
-rwxr-xr-xplatform/macos/scripts/document.sh2
-rwxr-xr-xplatform/macos/scripts/package.sh24
3 files changed, 36 insertions, 5 deletions
diff --git a/platform/macos/scripts/deploy-packages.sh b/platform/macos/scripts/deploy-packages.sh
index d9d74b2867..90c3c29308 100755
--- a/platform/macos/scripts/deploy-packages.sh
+++ b/platform/macos/scripts/deploy-packages.sh
@@ -46,6 +46,19 @@ buildPackageStyle() {
--name ${file_name} \
--file "${BINARY_DIRECTORY}/${file_name}" > /dev/null
fi
+ if [[ ${DEPLOY_APP} == true ]]; then
+ cd build/macos/app
+ rm -f 'Mapbox GL.app.zip'
+ zip -yr '../deploy/Mapbox GL.app.zip' 'Mapbox GL.app'
+ cd -
+ if [[ "${GITHUB_RELEASE}" == true ]]; then
+ echo "Uploading ${file_name} to GitHub"
+ github-release upload \
+ --tag "macos-v${PUBLISH_VERSION}" \
+ --name ${file_name} \
+ --file "${BINARY_DIRECTORY}/${file_name}" > /dev/null
+ fi
+ fi
}
export TRAVIS_REPO_SLUG=mapbox-gl-native
@@ -114,6 +127,6 @@ if [[ "${GITHUB_RELEASE}" == true ]]; then
fi
buildPackageStyle "xpackage" "symbols"
-buildPackageStyle "xpackage SYMBOLS=NO"
+DEPLOY_APP=true buildPackageStyle "xpackage SYMBOLS=NO"
step "Finished deploying ${PUBLISH_VERSION} in $(($SECONDS / 60)) minutes and $(($SECONDS % 60)) seconds"
diff --git a/platform/macos/scripts/document.sh b/platform/macos/scripts/document.sh
index 2e53dc359b..7960c87698 100755
--- a/platform/macos/scripts/document.sh
+++ b/platform/macos/scripts/document.sh
@@ -50,4 +50,4 @@ jazzy \
--output ${OUTPUT}
# https://github.com/realm/jazzy/issues/411
find ${OUTPUT} -name *.html -exec \
- perl -pi -e 's/BRANDLESS_DOCSET_TITLE/macOS SDK $1/, s/Mapbox\s+(Docs|Reference)/Mapbox macOS SDK $1/' {} \;
+ perl -pi -e 's/BRANDLESS_DOCSET_TITLE/Maps SDK for macOS $1/, s/Mapbox\s+(Docs|Reference)/Mapbox Maps SDK for macOS $1/' {} \;
diff --git a/platform/macos/scripts/package.sh b/platform/macos/scripts/package.sh
index 6ae0cc65cc..a5aae24e0c 100755
--- a/platform/macos/scripts/package.sh
+++ b/platform/macos/scripts/package.sh
@@ -6,6 +6,7 @@ set -u
NAME=Mapbox
OUTPUT=build/macos/pkg
+APP_OUTPUT=build/macos/app
DERIVED_DATA=build/macos
PRODUCTS=${DERIVED_DATA}
@@ -16,13 +17,21 @@ function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; }
function finish { >&2 echo -en "\033[0m"; }
trap finish EXIT
-rm -rf ${OUTPUT}
+rm -rf ${OUTPUT} ${APP_OUTPUT}
HASH=`git log | head -1 | awk '{ print $2 }' | cut -c 1-10` && true
PROJ_VERSION=$(git rev-list --count HEAD)
SEM_VERSION=$( git describe --tags --match=macos-v*.*.* --abbrev=0 | sed 's/^macos-v//' )
SHORT_VERSION=${SEM_VERSION%-*}
+XCODEBUILD_SCHEME=dynamic
+XCODEBUILD_ACTION=build
+if [[ ${BUILDTYPE} == Release ]]; then
+ XCODEBUILD_SCHEME=macosapp
+ XCODEBUILD_ACTION=archive
+ mkdir -p ${APP_OUTPUT}
+fi
+
step "Building targets (build ${PROJ_VERSION}, version ${SEM_VERSION})…"
xcodebuild \
CURRENT_PROJECT_VERSION=${PROJ_VERSION} \
@@ -30,10 +39,12 @@ xcodebuild \
CURRENT_SEMANTIC_VERSION=${SEM_VERSION} \
CURRENT_COMMIT_HASH=${HASH} \
-derivedDataPath ${DERIVED_DATA} \
+ -archivePath "${APP_OUTPUT}/macosapp.xcarchive" \
-workspace ./platform/macos/macos.xcworkspace \
- -scheme dynamic \
+ -scheme ${XCODEBUILD_SCHEME} \
-configuration ${BUILDTYPE} \
- -jobs ${JOBS} | xcpretty
+ -jobs ${JOBS} \
+ ${XCODEBUILD_ACTION} | xcpretty
step "Copying dynamic framework into place"
mkdir -p "${OUTPUT}/${NAME}.framework"
@@ -66,6 +77,13 @@ if [[ ${BUILDTYPE} == Release ]]; then
validate_dsym \
"${OUTPUT}/${NAME}.framework.dSYM/Contents/Resources/DWARF/${NAME}" \
"${OUTPUT}/${NAME}.framework/${NAME}"
+
+ step "Exporting Mapbox GL.app"
+ xcodebuild \
+ -exportArchive \
+ -archivePath "${APP_OUTPUT}/macosapp.xcarchive" \
+ -exportPath "${APP_OUTPUT}" \
+ -exportOptionsPlist platform/macos/ExportOptions.plist
fi
function create_podspec {