Skip to content

Instantly share code, notes, and snippets.

@supermarin
Created September 27, 2012 15:58
Show Gist options
  • Save supermarin/3794798 to your computer and use it in GitHub Desktop.
Save supermarin/3794798 to your computer and use it in GitHub Desktop.
Rakefile for Xcode development with Cocoapods and Git Submodules
workspace = Dir.entries(Dir.pwd).select {|file| file.match '.xcworkspace'}.first
def execute(cmd)
verbose(false) { sh cmd }
end
task :launch do
`open #{workspace}`
end
task :setup do
puts 'Initializing submodules...'
execute 'git submodule update --init --recursive'
puts 'Installing pods...'
execute 'pod install'
puts 'Done!'
Rake::Task['launch'].invoke
end
task :update do
puts 'Updating submodules...'
execute 'git submodule update --recursive'
puts 'Updating pods...'
execute 'pod update'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment