From 649d468d4275c1e5ff5b3e14644a1c47803caea4 Mon Sep 17 00:00:00 2001 From: Ian White Date: Fri, 24 Oct 2008 23:41:34 +1100 Subject: [PATCH] Send full garlic report to doc server --- Rakefile | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/Rakefile b/Rakefile index 46d2640..803f4da 100644 --- a/Rakefile +++ b/Rakefile @@ -10,28 +10,6 @@ plugin_name = 'resources_controller' task :default => :spec -task :cruise do - # run the garlic task, capture the output, if succesful make the docs and copy them to ardes - begin - sh "rake garlic:all > garlic_report.txt" - - # send abridged rpeort - report = File.read('garlic_report.txt').sub(/^.*?==========/m, '==========') - report = "garlic report for #{plugin_name}\n#{`git log -n 1 --pretty=oneline --no-color`}\n" + report - File.open('garlic_report.txt', 'w+') {|f| f << report } - sh "scp -i ~/.ssh/ardes garlic_report.txt ardes@ardes.com:~/subdomains/plugins/httpdocs/doc/#{plugin_name}_garlic_report.txt" - - # build doc and send that - cd "garlic/work/edge/vendor/plugins/#{plugin_name}" do - sh "rake doc:all" - sh "scp -i ~/.ssh/ardes -r doc ardes@ardes.com:~/subdomains/plugins/httpdocs/doc/#{plugin_name}" - end - - ensure - puts File.read('garlic_report.txt') - end -end - desc "Run the specs for #{plugin_name}" Spec::Rake::SpecTask.new(:spec) do |t| t.spec_files = FileList['spec/**/*_spec.rb'] @@ -101,4 +79,28 @@ task :get_garlic do end # load up the tasks for testing rspec generators against RC -require File.join(File.dirname(__FILE__), 'spec/generate_rake_task') \ No newline at end of file +require File.join(File.dirname(__FILE__), 'spec/generate_rake_task') + +task :cruise do + # run the garlic task, capture the output, if succesful make the docs and copy them to ardes + begin + `cp garlic_example.rb garlic.rb` + `rake get_garlic` + `cd garlic; git pull` + `rake garlic:clean` + sh "rake garlic:all" + sh "rake garlic:run_targets > garlic_report.txt" + + # send abridged report + report = File.read('garlic_report.txt').sub(/^.*?==========/m, '==========') + report = "garlic report for #{plugin_name}\n#{`git log -n 1 --pretty=oneline --no-color`}\n" + report + File.open('garlic_report.txt', 'w+') {|f| f << report } + sh "scp -i ~/.ssh/ardes garlic_report.txt ardes@ardes.com:~/subdomains/plugins/httpdocs/doc/#{plugin_name}_garlic_report.txt" + + # build doc and send that + cd "garlic/work/edge/vendor/plugins/#{plugin_name}" do + sh "rake doc:all" + sh "scp -i ~/.ssh/ardes -r doc ardes@ardes.com:~/subdomains/plugins/httpdocs/doc/#{plugin_name}" + end + end +end \ No newline at end of file