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.
By default, Xcode creates a branch named main when you create a new project with a Git repository. Control-click the branch you want to use as your starting point, choose “Branch from [branch name]”, and then enter a name for your branch that identifies the work you're doing.
Branching with Xcode 🙀 You can always navigate here by pressing “command + 2”. First, control + click the branch you want to branch from. Now you will be presented with a window that will allow you to name that branch. The new branch will show up in the folder called Branches.
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.
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!
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.
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