Created
February 27, 2009 11:08
-
-
Save ianwhite/71412 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Snippet from inherit_views Rakefile | |
# | |
# The cruise (CI) task runs 'doc:publish' if the build passes | |
# This runs rdoc, and pushes to gh-pages (using grancher) if the | |
# doc dir is newer than the gh-pages ref in the local git repo | |
require 'hanna/rdoctask' | |
require 'garlic/tasks' | |
require 'grancher/task' | |
task :cruise => ['garlic:all', 'doc:publish'] | |
Rake::RDocTask.new(:doc) do |d| | |
d.options << '--all' | |
d.rdoc_dir = 'doc' | |
d.main = 'README.rdoc' | |
d.title = "inherit_views API docs" | |
d.rdoc_files.include('README.rdoc', 'History.txt', 'License.txt', 'Todo.txt', 'lib/**/*.rb') | |
end | |
namespace :doc do | |
task :publish => :doc do | |
Rake::Task['doc:push'].invoke unless uptodate?('.git/refs/heads/gh-pages', 'doc') | |
end | |
Grancher::Task.new(:push) do |g| | |
g.keep_all | |
g.directory 'doc', 'doc' | |
g.branch = 'gh-pages' | |
g.push_to = 'origin' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment