Created
June 26, 2010 22:54
-
-
Save masuidrive/454411 to your computer and use it in GitHub Desktop.
build Rakefile for Titanium mobile on OSX
This file contains 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
# | |
# Titanium mobile Rakefile for iPhone build | |
# | |
DEV_PROVISIONING_UUID = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" | |
DEV_SIGN = "Developer name" | |
DEV_APP_NAME = "DevApp" | |
DEV_APP_ID = 'com.example.dev' | |
TITANIUM_SDK_VERSION = '1.3.2' | |
IPHONE_SDK_VERSION = '3.1' | |
BUILDER = "/Library/Application Support/Titanium/mobilesdk/osx/#{TITANIUM_SDK_VERSION}/iphone/builder.py" | |
task :run do | |
sh BUILDER, 'run', './' | |
end | |
task :install do | |
sh BUILDER, 'install', IPHONE_SDK_VERSION, './', DEV_APP_ID, DEV_APP_NAME, DEV_PROVISIONING_UUID, DEV_SIGN | |
end | |
task :adhoc => [:install] do | |
version = "#{DEV_APP_NAME}-#{Time.now.strftime("%Y%m%d-%H%M%S")}" | |
FileUtils.mkdir_p "build/adhoc/#{version}" | |
File.open("build/adhoc/#{version}/version.txt",'w') do |f| | |
f.puts(version) | |
end | |
FileUtils.cp_r "build/iphone/build/Release-iphoneos/#{DEV_APP_NAME}.app", "build/adhoc/#{version}/" | |
FileUtils.cp File.expand_path("~/Library/MobileDevice/Provisioning Profiles/#{DEV_PROVISIONING_UUID}.mobileprovision"), "build/adhoc/#{version}/#{DEV_APP_NAME}-dev.mobileprovision" | |
sh 'ditto', '-ck', '--keepParent', '--sequesterRsrc', "build/adhoc/#{version}", "build/adhoc/#{version}.zip" | |
FileUtils.rm_rf "build/adhoc/#{version}" | |
puts "[INFO] Zipped AdHoc: build/adhoc/#{version}.zip" | |
end | |
task :log do | |
sh 'cat build/iphone/build/build.log' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment