|
1
|
#!/bin/sh |
|
2
|
|
|
3
|
# run |
|
4
|
# |
|
5
|
# Copyright (c) 2015 Crashlytics. All rights reserved. |
|
6
|
|
|
7
|
# Figure out where we're being called from |
|
8
|
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
|
9
|
|
|
10
|
# Quote path in case of spaces or special chars |
|
11
|
DIR="\"${DIR}" |
|
12
|
|
|
13
|
PATH_SEP="/" |
|
14
|
VALIDATE_COMMAND="uploadDSYM\" $@ validate run-script" |
|
15
|
UPLOAD_COMMAND="uploadDSYM\" $@ run-script" |
|
16
|
|
|
17
|
# Ensure params are as expected, run in sync mode to validate |
|
18
|
eval $DIR$PATH_SEP$VALIDATE_COMMAND |
|
19
|
return_code=$? |
|
20
|
|
|
21
|
if [[ $return_code != 0 ]]; then |
|
22
|
exit $return_code |
|
23
|
fi |
|
24
|
|
|
25
|
# Verification passed, upload dSYM in background to prevent Xcode from waiting |
|
26
|
# Note: Validation is performed again before upload. |
|
27
|
# Output can still be found in Console.app |
|
28
|
eval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 & |