This repository has been archived by the owner on Sep 2, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce05f15
commit 1c1a3a4
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |