diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-01-26 18:52:44 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-01-27 11:44:16 +0100 |
commit | 62ea1f21858c69f6921c775ba7a3de201f0514d8 (patch) | |
tree | 7a4da88706e8a5513e1e13e993b2acc212cae3b1 /platform/ios/scripts | |
parent | a662508ddde4043ece36d8ea9b424368891d892c (diff) | |
download | qtlocation-mapboxgl-62ea1f21858c69f6921c775ba7a3de201f0514d8.tar.gz |
[core] remove trailing whitespace, add trailing newlines, add space after //
Diffstat (limited to 'platform/ios/scripts')
-rwxr-xr-x | platform/ios/scripts/deploy-packages.sh | 12 | ||||
-rwxr-xr-x | platform/ios/scripts/package.sh | 6 | ||||
-rwxr-xr-x | platform/ios/scripts/release-fabric.sh | 4 | ||||
-rwxr-xr-x | platform/ios/scripts/validate-fabric-zip.sh | 20 |
4 files changed, 21 insertions, 21 deletions
diff --git a/platform/ios/scripts/deploy-packages.sh b/platform/ios/scripts/deploy-packages.sh index 2265afdba6..479803aa05 100755 --- a/platform/ios/scripts/deploy-packages.sh +++ b/platform/ios/scripts/deploy-packages.sh @@ -9,7 +9,7 @@ set -u # GITHUB_RELEASE=true: Upload to github # BINARY_DIRECTORY=build/ios/deploy: Directory in which to save test packages -# environment variables and dependencies: +# environment variables and dependencies: # - You must run "mbx auth ..." before running # - Set GITHUB_TOKEN to a GitHub API access token in your environment to use GITHUB_RELEASE # - "wget" is required for downloading the zip files from s3 @@ -20,21 +20,21 @@ function finish { >&2 echo -en "\033[0m"; } trap finish EXIT buildPackageStyle() { - local package=$1 style="" + local package=$1 style="" if [[ ${#} -eq 2 ]]; then style="$2" - fi + fi step "Building: make ${package} ${style}" make ${package} step "Publishing ${package} with ${style}" local file_name="" - if [ -z ${style} ] + if [ -z ${style} ] then ./platform/ios/scripts/publish.sh "${PUBLISH_VERSION}" - file_name=mapbox-ios-sdk-${PUBLISH_VERSION}.zip + file_name=mapbox-ios-sdk-${PUBLISH_VERSION}.zip else ./platform/ios/scripts/publish.sh "${PUBLISH_VERSION}" ${style} - file_name=mapbox-ios-sdk-${PUBLISH_VERSION}-${style}.zip + 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} diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh index 796de17146..0ad7bb93d8 100755 --- a/platform/ios/scripts/package.sh +++ b/platform/ios/scripts/package.sh @@ -118,7 +118,7 @@ if [[ ${BUILD_FOR_DEVICE} == true ]]; then ${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphoneos/lib} \ ${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphonesimulator/lib} \ `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojson.a` - + cp -rv ${PRODUCTS}/${BUILDTYPE}-iphoneos/${NAME}.bundle ${STATIC_BUNDLE_DIR} fi @@ -158,7 +158,7 @@ else -o ${OUTPUT}/static/${NAME}.framework/${NAME} \ ${LIBS[@]/#/${PRODUCTS}/${BUILDTYPE}-iphonesimulator/lib} \ `find mason_packages/ios-${IOS_SDK_VERSION} -type f -name libgeojson.a` - + cp -rv ${PRODUCTS}/${BUILDTYPE}-iphonesimulator/${NAME}.bundle ${STATIC_BUNDLE_DIR} fi @@ -222,7 +222,7 @@ function create_podspec { if [[ ${1} == "static" ]]; then awk '/Pod::Spec.new/,/m.platform/' ${INPUT_PODSPEC} > ${OUTPUT_PODSPEC} cat platform/ios/${NAME}-iOS-SDK-static-part.podspec >> ${OUTPUT_PODSPEC} - sed -i '' "s/.*:http.*/${POD_SOURCE_PATH}/" ${OUTPUT_PODSPEC} + sed -i '' "s/.*:http.*/${POD_SOURCE_PATH}/" ${OUTPUT_PODSPEC} fi cp -pv LICENSE.md ${OUTPUT}/${1}/ } diff --git a/platform/ios/scripts/release-fabric.sh b/platform/ios/scripts/release-fabric.sh index 6f05e2886e..a523705b7b 100755 --- a/platform/ios/scripts/release-fabric.sh +++ b/platform/ios/scripts/release-fabric.sh @@ -15,7 +15,7 @@ echo "Downloading ${FILE_NAME}:" wget -P ${BINARY_DIRECTORY} http://mapbox.s3.amazonaws.com/mapbox-gl-native/ios/builds/${FILE_NAME} echo "Extracting ${ZIP_ARCHIVE_PATH} to ${BINARY_DIRECTORY}/${ZIP_OUTPUT}" -unzip -q ${ZIP_ARCHIVE_PATH} -d ${BINARY_DIRECTORY}/${ZIP_OUTPUT} +unzip -q ${ZIP_ARCHIVE_PATH} -d ${BINARY_DIRECTORY}/${ZIP_OUTPUT} ditto ${BINARY_DIRECTORY}/${ZIP_OUTPUT}/static/Mapbox.framework ${BINARY_DIRECTORY}/Mapbox.framework echo "Zipping framework:" @@ -25,7 +25,7 @@ cd $OLDPWD echo "Validating framework:" ./validate-fabric-zip.sh ${BINARY_DIRECTORY}/Mapbox.framework.zip - + echo "Uploading ${BINARY_DIRECTORY}/Mapbox.framework.zip to https://kits.fabric.io/manage-api/v1/kit-releases/ios/$BUNDLE_ID/$PUBLISH_VERSION with key ${FABRIC_KIT_API_KEY}" curl --fail -v -X PUT -H "X-FabricKits-ApiKey: ${FABRIC_KIT_API_KEY}" \ -F "release_artifact=@${BINARY_DIRECTORY}/Mapbox.framework.zip;type=application/octet-stream" \ diff --git a/platform/ios/scripts/validate-fabric-zip.sh b/platform/ios/scripts/validate-fabric-zip.sh index 7cc772d70c..2cd1e90ee7 100755 --- a/platform/ios/scripts/validate-fabric-zip.sh +++ b/platform/ios/scripts/validate-fabric-zip.sh @@ -12,7 +12,7 @@ set -e if [ ! -f "$1" ]; then printf "No file found at ${1}\n" - printf "Usage: $ ./validate_zip.sh <path to zip>\n"; exit 1; + printf "Usage: $ ./validate_zip.sh <path to zip>\n"; exit 1; fi function verifyFramework() { @@ -32,14 +32,14 @@ function verifyFramework() { printf "$FRAMEWORK_NAME contains modulemap: ✓\n" # Verify there is a modulemap so Swift can use the framework - if grep -q "link" "$MODULE_MAP"; then + if grep -q "link" "$MODULE_MAP"; then printf "$FRAMEWORK_NAME modulemap contains dependent system frameworks ✓\n" else printf "Warning: ${FRAMEWORK_NAME} does not list any system library dependencies. Double check all dependent frameworks and libraries are listed. \n"; fi # Verify there is at least one header listed in the module map - if grep -q ".*.h" "$MODULE_MAP"; then + if grep -q ".*.h" "$MODULE_MAP"; then printf "$FRAMEWORK_NAME modulemap contains headers ✓\n"; else printf "Error: ${FRAMEWORK_NAME} does not list any headers in the modulemap\n"; @@ -47,7 +47,7 @@ function verifyFramework() { fi # Verify there is at least a headers folder - if [[ ! -d "$HEADER_PATH" ]]; then + if [[ ! -d "$HEADER_PATH" ]]; then printf "ERROR: Headers not not found in ${FRAMEWORK_NAME}\n"; exit 5; fi @@ -55,7 +55,7 @@ function verifyFramework() { # Verify the static lib at least has simulator and the two common ARM architectures local PRESENT_ARCHITECTURES=$( xcrun lipo -info "${BINARY_PATH}" ) for arch in "armv7" "arm64" "i386" "x86_64"; do - if [[ ! $PRESENT_ARCHITECTURES == *$arch* ]]; then + if [[ ! $PRESENT_ARCHITECTURES == *$arch* ]]; then printf "ERROR: Architecture ${arch} not found in ${FRAMEWORK_NAME}\n"; exit 6; fi @@ -69,7 +69,7 @@ function verifyFramework() { if [[ ! $SYMBOLS == *"LLVM"* ]]; then printf "ERROR: Bitcode segments not found in ${FRAMEWORK_NAME}. Users will fail to archive their builds \n"; exit 7; - fi + fi done printf "$FRAMEWORK_NAME contains bitcode: ✓\n" @@ -82,19 +82,19 @@ function verifyFramework() { printf "$FRAMEWORK_NAME contains Info.plist: ✓\n" # Verify there is a bundle identifier in Info.plist - # And verify it does not contain any vestigial string templating + # And verify it does not contain any vestigial string templating local BUNDLE_NAME=$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "${PLIST_PATH}") if [[ -z "$BUNDLE_NAME" ]]; then printf "ERROR: Info.plist not found in $FRAMEWORK_NAME or CFBundleIdentifier not set\n"; exit 9; - elif [[ "$BUNDLE_NAME" == *"$"* ]]; then + elif [[ "$BUNDLE_NAME" == *"$"* ]]; then printf "ERROR: CFBundleIdentifier is invalid: $BUNDLE_NAME\n"; exit 10; else printf "$FRAMEWORK_NAME has bundle: $BUNDLE_NAME ✓\n" fi - # Verify there is a bundle version in the Info.plist + # Verify there is a bundle version in the Info.plist local BUNDLE_VERSION=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "${PLIST_PATH}") if [[ -z "$BUNDLE_VERSION" ]]; then printf "ERROR: No CFBundleShortVersionString found in $FRAMEWORK_NAME\n"; @@ -119,7 +119,7 @@ printf "Scanning for frameworks...\n" FRAMEWORKS=( $(find "$TEMP_DIR" -name "*.framework" -maxdepth 1) ) if [ -z "$FRAMEWORKS" ]; then printf "ERROR: No frameworks found at the top level within the zip archive."; - exit 2; + exit 2; fi # Verify each framework found individually |