Skip to content

Commit

Permalink
Making cruise task push docs to plugins.ardes.com on success
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Sep 23, 2008
1 parent 1db6354 commit 9f29e2c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
doc/*
garlic
garlic.rb
garlic_example.txt
24 changes: 22 additions & 2 deletions Rakefile
Expand Up @@ -6,11 +6,31 @@ require 'spec/rake/spectask'
require 'spec/rake/verify_rcov'
require 'rake/rdoctask'

plugin_name = File.basename(File.dirname(__FILE__))
plugin_name = 'resources_controller'

task :default => :spec

task :cruise => "garlic:all"
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/inherit_views"
end

ensure
puts File.read('garlic_report.txt')
end
end

desc "Run the specs for #{plugin_name}"
Spec::Rake::SpecTask.new(:spec) do |t|
Expand Down

0 comments on commit 9f29e2c

Please sign in to comment.