diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-06-13 14:47:13 -0700 |
---|---|---|
committer | Antonio Zugaldia <antonio@mapbox.com> | 2016-06-16 16:15:45 -0400 |
commit | 2893f39249650bac8c5c4c4edf6600018e811642 (patch) | |
tree | 87e0d88244b5d68317c844084e4e6a47058c87c8 /platform/macos/scripts/package.sh | |
parent | a5476346bf8dd696c6b7108d61dcc4928f8304e7 (diff) | |
download | qtlocation-mapboxgl-2893f39249650bac8c5c4c4edf6600018e811642.tar.gz |
[android] Rename OS X SDK to macOS SDK in Android 4.1 release branch
Fixes #5382
Also renamed as many references to OS X as possible to macOS in documentation.
Diffstat (limited to 'platform/macos/scripts/package.sh')
-rwxr-xr-x | platform/macos/scripts/package.sh | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/platform/macos/scripts/package.sh b/platform/macos/scripts/package.sh new file mode 100755 index 0000000000..a6952e8ab2 --- /dev/null +++ b/platform/macos/scripts/package.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail +set -u + +NAME=Mapbox +OUTPUT=build/macos/pkg +DERIVED_DATA=build/macos +PRODUCTS=${DERIVED_DATA}/Build/Products + +BUILDTYPE=${BUILDTYPE:-Release} +GCC_GENERATE_DEBUGGING_SYMBOLS=${SYMBOLS:-YES} + +function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; } +function finish { >&2 echo -en "\033[0m"; } +trap finish EXIT + +rm -rf ${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%-*} + +step "Building targets (build ${PROJ_VERSION}, version ${SEM_VERSION})…" +xcodebuild \ + GCC_GENERATE_DEBUGGING_SYMBOLS=${GCC_GENERATE_DEBUGGING_SYMBOLS} \ + CURRENT_PROJECT_VERSION=${PROJ_VERSION} \ + CURRENT_SHORT_VERSION=${SHORT_VERSION} \ + CURRENT_SEMANTIC_VERSION=${SEM_VERSION} \ + CURRENT_COMMIT_HASH=${HASH} \ + -derivedDataPath ${DERIVED_DATA} \ + -workspace ./platform/macos/macos.xcworkspace \ + -scheme dynamic \ + -configuration ${BUILDTYPE} \ + -jobs ${JOBS} | xcpretty + +step "Copying dynamic framework into place" +mkdir -p "${OUTPUT}/${NAME}.framework" +cp -r ${PRODUCTS}/${BUILDTYPE}/${NAME}.framework/* "${OUTPUT}/${NAME}.framework" +if [[ -e ${PRODUCTS}/${BUILDTYPE}/${NAME}.framework.dSYM ]]; then + cp -r ${PRODUCTS}/${BUILDTYPE}/${NAME}.framework.dSYM "${OUTPUT}" +fi + +if [[ "${GCC_GENERATE_DEBUGGING_SYMBOLS}" == false ]]; then + step "Stripping binaries…" + strip -Sx "${OUTPUT}/${NAME}.framework/${NAME}" +fi + +step "Copying library resources…" +cp -pv LICENSE.md "${OUTPUT}" +cp -pv platform/macos/docs/pod-README.md "${OUTPUT}/README.md" +sed -n -e '/^## /,$p' platform/macos/CHANGELOG.md > "${OUTPUT}/CHANGELOG.md" + +step "Generating API documentation…" +make xdocument OUTPUT="${OUTPUT}/documentation" |