2015-10-22 18:31:39 +00:00
|
|
|
#!/bin/sh
|
2015-06-20 15:24:17 +00:00
|
|
|
|
2015-10-22 18:31:39 +00:00
|
|
|
# run
|
|
|
|
#
|
|
|
|
# Copyright (c) 2015 Crashlytics. All rights reserved.
|
2014-05-10 13:18:46 +00:00
|
|
|
|
2015-10-22 18:31:39 +00:00
|
|
|
# Figure out where we're being called from
|
|
|
|
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
2014-05-10 13:18:46 +00:00
|
|
|
|
2015-10-22 18:31:39 +00:00
|
|
|
# Quote path in case of spaces or special chars
|
|
|
|
DIR="\"${DIR}"
|
2014-05-10 13:18:46 +00:00
|
|
|
|
2015-10-22 18:31:39 +00:00
|
|
|
PATH_SEP="/"
|
2016-06-04 15:29:21 +00:00
|
|
|
VALIDATE_COMMAND="uploadDSYM\" $@ validate run-script"
|
|
|
|
UPLOAD_COMMAND="uploadDSYM\" $@ run-script"
|
2014-05-10 13:18:46 +00:00
|
|
|
|
2015-10-22 18:31:39 +00:00
|
|
|
# Ensure params are as expected, run in sync mode to validate
|
|
|
|
eval $DIR$PATH_SEP$VALIDATE_COMMAND
|
|
|
|
return_code=$?
|
2014-05-10 13:18:46 +00:00
|
|
|
|
2015-10-22 18:31:39 +00:00
|
|
|
if [[ $return_code != 0 ]]; then
|
|
|
|
exit $return_code
|
|
|
|
fi
|
2014-05-10 13:18:46 +00:00
|
|
|
|
2015-10-22 18:31:39 +00:00
|
|
|
# Verification passed, upload dSYM in background to prevent Xcode from waiting
|
|
|
|
# Note: Validation is performed again before upload.
|
|
|
|
# Output can still be found in Console.app
|
|
|
|
eval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 &
|