Previously I had created an Xcode plugin for Hudson to allow you to configure and invoke builds directly. Although this worked for some cases, there are a few projects where the build process is more complex or non-standard enough to force me back to scripting things manually. Rather than update the plugin to try and cope with every esoteric use case, I decided to flip things around and simple create a ruby-wrapper for Xcode. This allows me to take what i need and create a custom Rakefile to control the build process.
The aim of this gem is to provide an object model for navigating the project structure and be able to invoke some common types of modifications. I aim to gradually add more functionality to this gem as I come across new use cases.
The source is available on github, but it is available to install from ruby forge by using the command:
$ gem install xcoder
A simple use-case would be to find the only project in a directory, update the project’s build number and then invoke a build:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
It’s early days yet, but I plan on adding support for OCUnit => JUnit output mapping (like the xcode-hudson-plugin) as well as loading provisioning profiles from the file system and generally manipulating the project file. Please send issues/feature requests to the Xcoder page on github