4 File::expand_path("~/Applications/"),
8 desc "Build and install (or upgrade) GitX"
9 task :install => [:uninstall_app, :build_app, :install_app]
10 desc "Clean build directory, uninstall application"
11 task :uninstall => [:clean_app, :uninstall_app]
12 desc "Clean build directory"
13 task :clean => [:clean_app]
15 desc "Build gitX using XCode"
17 system("xcodebuild build OBJROOT=build/ SYMROOT=build/")
21 system("xcodebuild -alltargets clean OBJROOT=build/ SYMROOT=build/")
24 desc "Copies the built GitX.app to the application folder"
26 target_locations.each do |loc|
27 if File.directory?(loc)
28 puts "Copying to (#{loc})"
29 system("cp -R build/Release/GitX.app #{loc}")
35 desc "Remove GitX.app from ~/Applications/ or /Applications/"
36 task :uninstall_app do
38 target_locations.each do |loc|
39 cur_path = File.join(loc, "GitX.app")
40 puts "Checking #{cur_path}"
41 if File.exists?( cur_path )
42 puts "Removing GitX.app from #{cur_path}"
43 system("rm", "-rf", cur_path)
48 puts "Couldn't find installed GitX.app" unless found
51 desc "Creates a zip file with current GitX"
59 delete = File.directory?("build/Release")
61 system("cd build/Release && zip -r #{name}.app.zip GitX.app")
62 system("mv build/Release/#{name}.app.zip .")
63 system("rm -rf build/Release") if delete
64 system("scp #{name}.app.zip sydney:public_html/gitx/Downloads/") # This is a local script -- Pieter
65 puts "Uploaded to http://gitx.frim.nl/Downloads/#{name}.app.zip"