Skip to content

Instantly share code, notes, and snippets.

@splhack
Created March 9, 2010 12:13
Show Gist options
  • Save splhack/326522 to your computer and use it in GitHub Desktop.
Save splhack/326522 to your computer and use it in GitHub Desktop.
require 'fileutils'
SDKS = %W|iphonesimulator3.1.2 iphoneos3.1.2|
CONFIGS = %W|Debug Release|
def xcodebuild(action)
system "security unlock-keychain $HOME/Library/Keychains/login.keychain"
SDKS.each do |sdk|
CONFIGS.each do |config|
system "xcodebuild -alltargets " +
"-configuration #{config} -sdk #{sdk} #{action}"
return false if $? != 0
end
end
true
end
task :default => ["build"]
desc "build"
task :build do
return false unless xcodebuild "build"
end
desc "clean"
task :clean do
FileUtils.rm_rf "build"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment