-
-
Save borgand/291580 to your computer and use it in GitHub Desktop.
Rakefile for iPhone distribution releasing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RELEASE_OUTPUT_PATH = File.expand_path("~/Projects/releases/Squeemote") | |
TARGET_NAME = "Squeemote" | |
CONFIGURATION = ENV['CONFIGURATION'] || "Distribution" | |
SDK_VERSION = ENV['SDK'] || 'iphoneos2.2' | |
task :test do | |
system "xcodebuild -target Testing -configuration Development -sdk iphonesimulator2.2" | |
end | |
task :release do | |
puts "* Bumping build version." | |
`agvtool bump -all` | |
puts "* Building #{CONFIGURATION} release." | |
`xcodebuild -target #{TARGET_NAME} -configuration #{CONFIGURATION} -sdk #{SDK_VERSION}` | |
build_path = File.join('build', "#{CONFIGURATION}-iphoneos") | |
puts "* Creating #{CONFIGURATION} package" | |
output_path = File.join(RELEASE_OUTPUT_PATH, `agvtool mvers -terse1`.strip + "-#{CONFIGURATION.downcase}") | |
`rm -Rf #{output_path}` if File.exist?(output_path) | |
`mkdir #{output_path} && mv #{File.join(build_path, '*')} #{output_path}` | |
puts "* Compressing." | |
`cd #{output_path} && zip -ry #{TARGET_NAME}.zip #{TARGET_NAME}.app` | |
puts "* Done." | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment