Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #!/bin/bash                                                                        
  2.                                                                                    
  3. ARCHIVE_PATH='/tmp/foo.xcarchive'                                              
  4. if [ -e $ARCHIVE_PATH ]; then                                                      
  5.     rm -rf $ARCHIVE_PATH                                                          
  6. fi                                                                                
  7. xcodebuild -workspace foo.xcworkspace -scheme foo -archivePath $ARCHIVE_PATH archive
  8.                                                                                    
  9. IPA_PATH='/tmp/foo.ipa'                                                        
  10. if [ -e $IPA_PATH ]; then                                                          
  11.     rm $IPA_PATH                                                                  
  12. fi                                                                                
  13. xcodebuild -exportArchive -exportFormat IPA -archivePath $ARCHIVE_PATH -exportPath $IPA_PATH -exportProvisioningProfile 'ios_inhouse_distribution'
  14. rm -rf $ARCHIVE_PATH