aboutsummaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-11-16 14:07:55 +0100
committerXavier Noria <fxn@hashref.com>2010-11-16 14:07:55 +0100
commitdff0dfb7f80199e8f13dd20b39e0bc6b79438863 (patch)
tree0216fe8a0d163602d5d7b255f4a2262adbb18b64 /Rakefile
parente1e780a31d56f3bf22f13afd92b7e1274bd4b531 (diff)
downloadrails-dff0dfb7f80199e8f13dd20b39e0bc6b79438863.tar.gz
rails-dff0dfb7f80199e8f13dd20b39e0bc6b79438863.tar.bz2
rails-dff0dfb7f80199e8f13dd20b39e0bc6b79438863.zip
adds a publish_docs task to force stable docs generation and publishing after a new stable tag has been pushed
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 5065fb286b..5bb1d4ade2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -4,6 +4,7 @@ require 'rdoc'
require 'rake'
require 'rdoc/task'
require 'rake/gempackagetask'
+require 'net/http'
# 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.
@@ -172,3 +173,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 verion 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