0
puts %x{ xcodebuild -alltargets clean OBJROOT=build/ SYMROOT=build/ }
0
+desc 'Install GitNub.app and nub'
0
+task :install => [:testdeps, :install_app, :install_nub]
0
+desc 'Install GitNub.app in /Applications'
0
+task :install_app => [:uninstall_app, "xcode:install:#{DEFAULT_TARGET}:#{RELEASE_CONFIGURATION}"]
0
+desc 'Install nub in /usr/local/bin/'
0
+ exec("sudo", "cp", "nub", "/usr/local/bin/nub")
0
+desc 'Uninstall /Applications/GitNub.app'
0
+ # this is necessary for install_app, because Xcode, for some braindead reason,
0
+ # chmods the installed product a-w, so I can't overwrite or rm it
0
+ if File.exists?("/Applications/GitNub.app")
0
+ system("chmod", "-R", "u+w", "/Applications/GitNub.app")
0
+ system("rm", "-rf", "/Applications/GitNub.app")
0
desc "Add files to Xcode project"
0
targets = xcode_targets
0
configs = xcode_configurations
0
- %w{build clean}.each do |action|
0
+ %w{build clean install}.each do |action|
0
namespace "#{action}" do
0
targets.each do |target|
0
desc "#{action} #{target}"
0
task "#{target}" do |t|
0
- puts %x{ xcodebuild -target '#{target}' #{action} OBJROOT=build/ SYMROOT=build/ }
0
+ puts %x{ xcodebuild -target '#{target}' #{action} OBJROOT=build/ SYMROOT=build/ DSTROOT=/ }
0
# alias the task above using a massaged name
0
configs.each do |config|
0
desc "#{action} #{target} #{config}"
0
task "#{config}" do |t|
0
- puts %x{ xcodebuild -target '#{target}' -configuration '#{config}' #{action} SYMROOT=build/ OBJROOT=build/ }
0
+ puts %x{ xcodebuild -target '#{target}' -configuration '#{config}' #{action} SYMROOT=build/ OBJROOT=build/ DSTROOT=/ }
Comments
No one has commented yet.