From 06fdd73853e391fc8b2ef2926ca2b3ed4962e86e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eloy=20Dur=C3=A1n?= Date: Thu, 31 Oct 2013 22:10:47 +0100 Subject: [PATCH] [profiler] Add OS X tasks for development and release mode. --- lib/motion/project/template/osx.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/motion/project/template/osx.rb b/lib/motion/project/template/osx.rb index 9ff825bb..ca261a2b 100644 --- a/lib/motion/project/template/osx.rb +++ b/lib/motion/project/template/osx.rb @@ -95,9 +95,12 @@ task :static do App.build('MacOSX', :static => true) end -# TODO change to singular build task for development and release. -desc "Run a build through Instruments" -task :profile => 'build:development' do - plist = App.config.profiler_config_plist('MacOSX', "-NSDocumentRevisionsDebugMode YES #{ENV['args']}") - App.profile('MacOSX', plist) +namespace :profile do + %w{ development release }.each do |mode| + desc "Run a #{mode} build through Instruments" + task mode => "build:#{mode}" do + plist = App.config.profiler_config_plist('MacOSX', "-NSDocumentRevisionsDebugMode YES #{ENV['args']}") + App.profile('MacOSX', plist) + end + end end