Skip to content
This repository has been archived by the owner on Sep 2, 2018. It is now read-only.

Commit

Permalink
add the Rakefile to create dmg file
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Sep 18, 2012
1 parent ce05f15 commit 1c1a3a4
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Rakefile
@@ -0,0 +1,34 @@
APP_NAME = "PodCreator"
CONFIG = "Release"

begin
info_plist = load_plist(File.read("#{APP_NAME}/#{APP_NAME}-Info.plist"))
VERSION = info_plist["CFBundleShortVersionString"].to_s
raise "can't load Info.plist" if VERSION.length == 0
DMG_FILE = "#{APP_NAME}-#{VERSION}.dmg"
rescue
raise "<< This Rakefile depends on MacRuby!! Should run with macrake. >>"
end

task :default => :dmg

desc "Build Application"
task :build do
sh "xcodebuild -target #{APP_NAME} -configuration #{CONFIG}"
end

desc "Embed MacRuby to Application"
task :embed do
sh "xcodebuild -target Deployment"
end

desc "Make #{DMG_FILE}"
task :dmg => [:clean, :embed] do
sh "hdiutil create #{DMG_FILE} -volname #{APP_NAME} -srcfolder build/Release/#{APP_NAME}.app"
end

desc "Clean building files"
task :clean do
sh "rm -rf build"
sh "rm -rf #{DMG_FILE}"
end

0 comments on commit 1c1a3a4

Please sign in to comment.