Xcode Service: Select Git Branch

前端 未结 4 1616
醉话见心
醉话见心 2021-02-14 13:59

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 bo

相关标签:
4条回答
  • 2021-02-14 14:41

    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).

    0 讨论(0)
  • 2021-02-14 14:43

    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.

    0 讨论(0)
  • 2021-02-14 14:48

    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!

    0 讨论(0)
  • 2021-02-14 14:48

    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.

    0 讨论(0)
提交回复
热议问题