File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 1616
1717readonly SCRIPTS_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
1818
19- " $SCRIPTS_DIR " /build_all clean && \
19+ # Clean out CocoaPods.
2020" $SCRIPTS_DIR " /release/manage_pods.py clean
21+
22+ # Clean out Xcode build products.
23+ # Note that Xcode seems to want to hold on to old Swift module maps, requiring a
24+ # "force" clean instead of just asking xcodebuild to clean normally.
25+ readonly WORKSPACE_SCHEMES=$( " $SCRIPTS_DIR " /xcode/list_all_xcode_schemes)
26+
27+ for workspace_scheme in $WORKSPACE_SCHEMES ; do
28+ workspace=$( echo $workspace_scheme | cut -d: -f1)
29+ scheme=$( echo $workspace_scheme | cut -d: -f2)
30+ options=" -workspace $workspace -scheme $scheme -showBuildSettings"
31+ build_dir=$( xcodebuild $options | grep -m1 " ^ BUILD_DIR =" | cut -d= -f2)
32+ if [[ ! -z $build_dir ]]; then
33+ derived_data_dir=$( dirname $( dirname " $build_dir " ) )
34+ echo " Force-cleaning $derived_data_dir ..."
35+ rm -rf " $derived_data_dir "
36+ fi
37+ done
You can’t perform that action at this time.
0 commit comments