diff options
author | Jason Wray <jason@mapbox.com> | 2016-09-30 16:24:00 -0400 |
---|---|---|
committer | Jason Wray <friedbunny@users.noreply.github.com> | 2016-09-30 18:49:05 -0400 |
commit | d7a44a6b902f2bf90766f7c470cf759187193480 (patch) | |
tree | e10cc64f373df37591b73d2f3f1469e04fd78232 | |
parent | 161955209d87599771c0e822d655dd06d1fab069 (diff) | |
download | qtlocation-mapboxgl-d7a44a6b902f2bf90766f7c470cf759187193480.tar.gz |
[macos][build] Validate dSYM and framework UUIDs
-rwxr-xr-x | platform/macos/scripts/package.sh | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/platform/macos/scripts/package.sh b/platform/macos/scripts/package.sh index b777d22be8..9cb38c6c71 100755 --- a/platform/macos/scripts/package.sh +++ b/platform/macos/scripts/package.sh @@ -43,10 +43,31 @@ if [[ -e ${PRODUCTS}/${BUILDTYPE}/${NAME}.framework.dSYM ]]; then fi if [[ ${SYMBOLS} = NO ]]; then - step "Stripping binaries…" + step "Stripping symbols from binaries" strip -Sx "${OUTPUT}/${NAME}.framework/${NAME}" 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 [[ ${BUILDTYPE} == Release ]]; then + validate_dsym \ + "${OUTPUT}/${NAME}.framework.dSYM/Contents/Resources/DWARF/${NAME}" \ + "${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" |