aboutsummaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-11-22 17:32:27 -0500
committerNeeraj Singh <neerajdotname@gmail.com>2010-11-22 17:32:27 -0500
commit5debc65c356c619bce20dcc10c0befc7c4204ef5 (patch)
treedc32bab1eccd11bacdaff70f25696689a2b9dc66 /Rakefile
parent1c68e55ae5e90b7c072a1f6030ea3dd4becd8a07 (diff)
parent818b366c3e3645b3375ee0b1d1023621dbeaede2 (diff)
downloadrails-5debc65c356c619bce20dcc10c0befc7c4204ef5.tar.gz
rails-5debc65c356c619bce20dcc10c0befc7c4204ef5.tar.bz2
rails-5debc65c356c619bce20dcc10c0befc7c4204ef5.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile56
1 files changed, 34 insertions, 22 deletions
diff --git a/Rakefile b/Rakefile
index 5065fb286b..8c72312f28 100644
--- a/Rakefile
+++ b/Rakefile
@@ -3,7 +3,16 @@ require 'rdoc'
require 'rake'
require 'rdoc/task'
-require 'rake/gempackagetask'
+require 'net/http'
+
+$:.unshift File.expand_path('..', __FILE__)
+require "tasks/release"
+
+desc "Build gem files for all projects"
+task :build => "all:build"
+
+desc "Release all gems to gemcutter and create a tag"
+task :release => "all:release"
# RDoc skips some files in the Rails tree due to its binary? predicate. This is a quick
# hack for edge docs, until we decide which is the correct way to address this issue.
@@ -54,27 +63,6 @@ task :smoke do
system %(cd activerecord && #{$0} sqlite3:isolated_test)
end
-spec = eval(File.read('rails.gemspec'))
-Rake::GemPackageTask.new(spec) do |pkg|
- pkg.gem_spec = spec
-end
-
-desc "Release all gems to gemcutter. Package rails, package & push components, then push rails"
-task :release => :release_projects do
- require 'rake/gemcutter'
- Rake::Gemcutter::Tasks.new(spec).define
- Rake::Task['gem:push'].invoke
-end
-
-desc "Release all components to gemcutter."
-task :release_projects => :package do
- errors = []
- PROJECTS.each do |project|
- system(%(cd #{project} && #{$0} release)) || errors << project
- end
- fail("Errors in #{errors.join(', ')}") unless errors.empty?
-end
-
desc "Install gems for all projects."
task :install => :gem do
version = File.read("RAILS_VERSION").strip
@@ -172,3 +160,27 @@ task :update_versions do
end
end
end
+
+#
+# We have a webhook configured in Github that gets invoked after pushes.
+# This hook triggers the following tasks:
+#
+# * updates the local checkout
+# * updates Rails Contributors
+# * generates and publishes edge docs
+# * if there's a new stable tag, generates and publishes stable docs
+#
+# Everything is automated and you do NOT need to run this task normally.
+#
+# We publish a new version by tagging, and pushing a tag does not trigger
+# that webhook. Stable docs would be updated by any subsequent regular
+# push, but if you want that to happen right away just run this.
+#
+desc 'Publishes docs, run this AFTER a new stable tag has been pushed'
+task :publish_docs do
+ Net::HTTP.new('rails-hooks.hashref.com').start do |http|
+ request = Net::HTTP::Post.new('/rails-master-hook')
+ response = http.request(request)
+ puts response.body
+ end
+end