From 1795f11a0f256dcbc2c09c3ee65cfb16b20bb6a2 Mon Sep 17 00:00:00 2001 From: Watson Date: Mon, 22 Jul 2013 20:18:18 +0900 Subject: [PATCH] move `rake crashlog' task into project.rb --- lib/motion/project.rb | 6 ++++++ lib/motion/project/template/ios.rb | 6 ------ lib/motion/project/template/osx.rb | 6 ------ 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/lib/motion/project.rb b/lib/motion/project.rb index c95ad577..c8598d32 100644 --- a/lib/motion/project.rb +++ b/lib/motion/project.rb @@ -69,3 +69,9 @@ task :ctags do sh "#{ctags} --options=\"#{config}\" #{bs_files.map { |x| '"' + x + '"' }.join(' ')}" end end + +desc "Show a last crash log" +task :crashlog do + logs = Dir.glob(File.join(File.expand_path("~/Library/Logs/DiagnosticReports/"), "#{App.config.name}_*")) + sh "open -a Console #{logs.last}" +end diff --git a/lib/motion/project/template/ios.rb b/lib/motion/project/template/ios.rb index 6959e231..7af264f0 100644 --- a/lib/motion/project/template/ios.rb +++ b/lib/motion/project/template/ios.rb @@ -166,9 +166,3 @@ task :static do App.info 'Create', fat_lib sh "/usr/bin/lipo -create #{libs.join(' ')} -output \"#{fat_lib}\"" end - -desc "Show a last crash log" -task :crashlog do - logs = Dir.glob(File.join(File.expand_path("~/Library/Logs/DiagnosticReports/"), "#{App.config.name}_*")) - sh "open -a Console #{logs.last}" -end diff --git a/lib/motion/project/template/osx.rb b/lib/motion/project/template/osx.rb index 1a4df35c..dfdbf0fc 100644 --- a/lib/motion/project/template/osx.rb +++ b/lib/motion/project/template/osx.rb @@ -90,9 +90,3 @@ desc "Create a .a static library" task :static do App.build('MacOSX', :static => true) end - -desc "Show a last crash log" -task :crashlog do - logs = Dir.glob(File.join(File.expand_path("~/Library/Logs/DiagnosticReports/"), "#{App.config.name}_*")) - sh "open -a Console #{logs.last}" -end