Posted onEdited onDisqus: Word count in article: 3.1kReading time ≈3 mins.
I used Jenkins with some Xcode plugins as our iOS CI half a year ago.
The main function I want is to build our project daily in the middle night, and +1 on the build number, then push this commit to Phabricator, if any of these steps is fail, it will post a notification to Slack.
But after we are try to using Carthage instead of CocoaPod, it need to Carthage update before building. The Jenkins canβt run commands before building. So I tried using shell directly.
update code
First it should cd into the projectβs folder, then checkout new commits and update new frameworks
1 2 3 4 5
cd $(dirname $0) git checkout master git reset --hard origin/master
/usr/local/bin/carthage update
then check that whether the last author is a coworker or the bot itself