Skip to content

Instantly share code, notes, and snippets.

@yinghau76
Created March 16, 2014 04:17
Show Gist options
  • Select an option

  • Save yinghau76/9578481 to your computer and use it in GitHub Desktop.

Select an option

Save yinghau76/9578481 to your computer and use it in GitHub Desktop.
Rake task to zip dSYM in RubyMotion project
namespace 'dsym' do
desc 'Archive dSYM'
task :zip do
App.config_without_setup.build_mode = :release
App.config_without_setup.distribution_mode = true
app_bundle = App.config.app_bundle('iPhoneOS')
app_dsym = app_bundle.sub(/\.app$/, '.dSYM')
app_dsym_zip = "#{app_dsym}-#{App.config.version}.zip"
if !File.exist?(app_dsym_zip) or File.mtime(app_dsym) > File.mtime(app_dsym_zip)
Dir.chdir(File.dirname(app_dsym)) do
puts "creating #{app_dsym_zip} "
sh "/usr/bin/zip -q -r \"#{File.basename(app_dsym_zip)}\" \"#{File.basename(app_dsym)}\""
end
else
puts "#{app_dsym_zip} is already the latest one."
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment