|  | @@ -29,36 +29,43 @@ cd `dirname $0`/../../..
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  cd $EXAMPLE_PATH
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -# clean the directory
 | 
	
		
			
				|  |  | -rm -rf Pods
 | 
	
		
			
				|  |  | -rm -rf *.xcworkspace
 | 
	
		
			
				|  |  | -rm -f Podfile.lock
 | 
	
		
			
				|  |  | +if [ "$FRAMEWORKS" == "NO" ]; then
 | 
	
		
			
				|  |  | +  if [ "$SCHEME" == "watchOS-sample-WatchKit-App" ]; then
 | 
	
		
			
				|  |  | +    SCHEME="watchOS-sample"
 | 
	
		
			
				|  |  | +  fi
 | 
	
		
			
				|  |  | +  cd ..
 | 
	
		
			
				|  |  | +  ../../../tools/bazel build $SCHEME
 | 
	
		
			
				|  |  | +else
 | 
	
		
			
				|  |  | +  # clean the directory
 | 
	
		
			
				|  |  | +  rm -rf Pods
 | 
	
		
			
				|  |  | +  rm -rf *.xcworkspace
 | 
	
		
			
				|  |  | +  rm -f Podfile.lock
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -pod install
 | 
	
		
			
				|  |  | +  pod install
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -set -o pipefail
 | 
	
		
			
				|  |  | -XCODEBUILD_FILTER='(^CompileC |^Ld |^.*clang |^ *cd |^ *export |^Libtool |^.*libtool |^CpHeader |^ *builtin-copy )'
 | 
	
		
			
				|  |  | -if [ "$SCHEME" == "tvOS-sample" ]; then
 | 
	
		
			
				|  |  | -  xcodebuild \
 | 
	
		
			
				|  |  | -    build \
 | 
	
		
			
				|  |  | -    -workspace *.xcworkspace \
 | 
	
		
			
				|  |  | -    -scheme $SCHEME \
 | 
	
		
			
				|  |  | -    -destination generic/platform=tvOS \
 | 
	
		
			
				|  |  | -    -derivedDataPath Build/Build \
 | 
	
		
			
				|  |  | -    CODE_SIGN_IDENTITY="" \
 | 
	
		
			
				|  |  | -    CODE_SIGNING_REQUIRED=NO \
 | 
	
		
			
				|  |  | -    | egrep -v "$XCODEBUILD_FILTER" \
 | 
	
		
			
				|  |  | -    | egrep -v "^$" -
 | 
	
		
			
				|  |  | -else
 | 
	
		
			
				|  |  | -  xcodebuild \
 | 
	
		
			
				|  |  | -    build \
 | 
	
		
			
				|  |  | -    -workspace *.xcworkspace \
 | 
	
		
			
				|  |  | -    -scheme $SCHEME \
 | 
	
		
			
				|  |  | -    -destination generic/platform=iOS \
 | 
	
		
			
				|  |  | -    -derivedDataPath Build/Build \
 | 
	
		
			
				|  |  | -    CODE_SIGN_IDENTITY="" \
 | 
	
		
			
				|  |  | -    CODE_SIGNING_REQUIRED=NO \
 | 
	
		
			
				|  |  | -    | egrep -v "$XCODEBUILD_FILTER" \
 | 
	
		
			
				|  |  | -    | egrep -v "^$" -
 | 
	
		
			
				|  |  | +  set -o pipefail
 | 
	
		
			
				|  |  | +  XCODEBUILD_FILTER='(^CompileC |^Ld |^.*clang |^ *cd |^ *export |^Libtool |^.*libtool |^CpHeader |^ *builtin-copy )'
 | 
	
		
			
				|  |  | +  if [ "$SCHEME" == "tvOS-sample" ]; then
 | 
	
		
			
				|  |  | +    xcodebuild \
 | 
	
		
			
				|  |  | +      build \
 | 
	
		
			
				|  |  | +      -workspace *.xcworkspace \
 | 
	
		
			
				|  |  | +      -scheme $SCHEME \
 | 
	
		
			
				|  |  | +      -destination generic/platform=tvOS \
 | 
	
		
			
				|  |  | +      -derivedDataPath Build/Build \
 | 
	
		
			
				|  |  | +      CODE_SIGN_IDENTITY="" \
 | 
	
		
			
				|  |  | +      CODE_SIGNING_REQUIRED=NO \
 | 
	
		
			
				|  |  | +      | egrep -v "$XCODEBUILD_FILTER" \
 | 
	
		
			
				|  |  | +      | egrep -v "^$" -
 | 
	
		
			
				|  |  | +  else
 | 
	
		
			
				|  |  | +    xcodebuild \
 | 
	
		
			
				|  |  | +      build \
 | 
	
		
			
				|  |  | +      -workspace *.xcworkspace \
 | 
	
		
			
				|  |  | +      -scheme $SCHEME \
 | 
	
		
			
				|  |  | +      -destination generic/platform=iOS \
 | 
	
		
			
				|  |  | +      -derivedDataPath Build/Build \
 | 
	
		
			
				|  |  | +      CODE_SIGN_IDENTITY="" \
 | 
	
		
			
				|  |  | +      CODE_SIGNING_REQUIRED=NO \
 | 
	
		
			
				|  |  | +      | egrep -v "$XCODEBUILD_FILTER" \
 | 
	
		
			
				|  |  | +      | egrep -v "^$" -
 | 
	
		
			
				|  |  | +  fi
 | 
	
		
			
				|  |  |  fi
 | 
	
		
			
				|  |  | -
 |