summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2016-09-30 05:20:15 -0400
committerJason Wray <friedbunny@users.noreply.github.com>2016-09-30 18:49:05 -0400
commit9a92a3a5dd48f12e6324d64844fdc076391e2bae (patch)
tree0a50d8d36df1764f94dae39df7075cb631af9090
parentc72deacdcfa09327d24513b67170757c9c14df4e (diff)
downloadqtlocation-mapboxgl-9a92a3a5dd48f12e6324d64844fdc076391e2bae.tar.gz
[ios][build] Validate dSYM and framework UUIDs
-rwxr-xr-xplatform/ios/scripts/package.sh23
1 files changed, 22 insertions, 1 deletions
diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh
index 4572401b33..796de17146 100755
--- a/platform/ios/scripts/package.sh
+++ b/platform/ios/scripts/package.sh
@@ -178,7 +178,7 @@ else
fi
if [[ ${SYMBOLS} = NO ]]; then
- step "Stripping symbols from binaries…"
+ step "Stripping symbols from binaries"
if [[ ${BUILD_STATIC} == true ]]; then
strip -Sx "${OUTPUT}/static/${NAME}.framework/${NAME}"
fi
@@ -187,6 +187,27 @@ if [[ ${SYMBOLS} = NO ]]; then
fi
fi
+function get_comparable_uuid {
+ echo $(dwarfdump --uuid ${1} | sed -n 's/.*UUID:\([^\"]*\) .*/\1/p' | sort)
+}
+
+function validate_dsym {
+ step "Validating dSYM and framework UUIDs…"
+ DSYM_UUID=$(get_comparable_uuid "${1}")
+ FRAMEWORK_UUID=$(get_comparable_uuid "${2}")
+ echo -e "${1}\n ${DSYM_UUID}\n${2}\n ${FRAMEWORK_UUID}"
+ if [[ ${DSYM_UUID} != ${FRAMEWORK_UUID} ]]; then
+ echo "Error: dSYM and framework UUIDs do not match."
+ exit 1
+ fi
+}
+
+if [[ ${BUILD_DYNAMIC} == true && ${BUILDTYPE} == Release ]]; then
+ validate_dsym \
+ "${OUTPUT}/dynamic/${NAME}.framework.dSYM/Contents/Resources/DWARF/${NAME}" \
+ "${OUTPUT}/dynamic/${NAME}.framework/${NAME}"
+fi
+
function create_podspec {
step "Creating local podspec (${1})"
[[ $SYMBOLS = YES ]] && POD_SUFFIX="-symbols" || POD_SUFFIX=""