Context : My project contains two backend servers, one for development and one for production. Each time I make a build for QA, I'll need to put which server the build is on on TestFlight (this is ok). But on my archive list on Xcode, I easily get more than 100 archives where I have to put manually if it was prod or dev server.
The main issue here is when the QA needs to rollback to a specific version on a specific server.
Question : Is there an automatic way to put a comment on the archive upon building ? I would like to put something like :
[Build Number] - [Dev|Live] Server
Thanks
We use the following command to add a comment to the archive directly after the build (xcodebuild):
/usr/libexec/PlistBuddy -c "Add :Comment string \"your comment goes here\"" "$ARCHIVE_DIR/Info.plist"
with $ARCHIVE_DIR being the directory to the archive in question, e. g.:
ARCHIVE_DIR=`ls -dt1 $HOME/Library/Developer/Xcode/Archives/*/*.xcarchive |head -n1`
I tried Norman's idea but couldn't get the syntax to work. In the end I used:
ARCHIVE_DIR=$(ls -dt1 $HOME/Library/Developer/Xcode/Archives/*/*.xcarchive/Info.plist |head -n1)
/usr/libexec/PlistBuddy -c "Add :Comment string \"your comment goes here\"" "$ARCHIVE_DIR"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With