Xcode Service: Select Git Branch

点点圈 提交于 2019-12-12 07:48:03

问题


I started to set up the new Xcode service in Mavericks. I created a new bot - but I wasn't asked for the branch it should build?

How can I select the branch for each bot? I do not only want to build master, but different branches too.


回答1:


In the current version, when you create the bot in Xcode, it will be linked to the currently active branch. You can easily verify (but not change) it from the web interface, when you navigate to the bot -> Bot settings (when you click the cog wheel in the upper right).

Alternatively you can create the bot via the web interface where you can specify the branch name plain-text.




回答2:


Assuming you want to change it whenever you want and not recreate bots each time, you can use the script: (pre-trigger)

cd "$XCS_SOURCE_DIR/<repo name here>"
git checkout development

Just change it to whatever branch you want and whatever repo you want. (you can look in the pre trigger logs to see if you mess up the change directory, ie if you misspel the repo name or whatever else. Good luck!




回答3:


Create a bot for each branch you are interested in testing. You can create as many bots as you want. Each one will check out whatever branch you specify, and run per the schedule you set individually.




回答4:


It seems like this is now possible (in Xcode 7.1). However, you only get the option your project actually has more than one branch (makes sense).



来源:https://stackoverflow.com/questions/19585504/xcode-service-select-git-branch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!