Skip to content

Instantly share code, notes, and snippets.

@PsychoTea
Created January 5, 2018 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PsychoTea/598abc4f1791f060ffaf28d661429733 to your computer and use it in GitHub Desktop.
Save PsychoTea/598abc4f1791f060ffaf28d661429733 to your computer and use it in GitHub Desktop.
Builds an iOS app IPA from the first found .xcarchive file in the current directory
## Builds an IPA from the first found .xcarchive file in the current directory
currDir=$(dirname $0)
archiveName=$(ls $currDir | grep -m1 .xcarchive)
appName=$(echo "${archiveName%% *}")
echo Building an IPA for $appName...
archivePath=$currDir/$archiveName
mkdir $currDir/Payload
cp -r "$archivePath/Products/Applications/$appName.app" $currDir/Payload/
appPath=$currDir/Payload/$appName.app
## Add here any specific files you wish to remove/modify
rm $appPath/embedded.mobileprovision
echo "Please enter the release candidate name: "
read name
cd $currDir
zip -r $currDir/$appName-$name.ipa ./Payload
rm -r $currDir/Payload
rm -r "$archivePath"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment