Skip to content

Commit

Permalink
Send full garlic report to doc server
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Oct 24, 2008
1 parent 9e0340e commit 649d468
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions Rakefile
Expand Up @@ -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']
Expand Down Expand Up @@ -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')
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

0 comments on commit 649d468

Please sign in to comment.