From dff0dfb7f80199e8f13dd20b39e0bc6b79438863 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 16 Nov 2010 14:07:55 +0100 Subject: adds a publish_docs task to force stable docs generation and publishing after a new stable tag has been pushed --- Rakefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'Rakefile') 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 -- cgit v1.2.3 From 7e4f9dbd674a5f66c0b0eb6f75783ff31b045dc3 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Tue, 16 Nov 2010 14:48:23 -0800 Subject: Remove the old gem release task --- Rakefile | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 5bb1d4ade2..a58d358369 100644 --- a/Rakefile +++ b/Rakefile @@ -3,7 +3,6 @@ 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 @@ -55,27 +54,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 -- cgit v1.2.3 From 4ff8c59fb71de4d8d1c5066c73b110bce29e7aa5 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Tue, 16 Nov 2010 15:42:39 -0800 Subject: Update the main Rakefile to use the new release tasks --- Rakefile | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index a58d358369..9da84ee49b 100644 --- a/Rakefile +++ b/Rakefile @@ -5,6 +5,15 @@ require 'rake' require 'rdoc/task' 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", "git:tag"] + # 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. # If not fixed in RDoc itself, via an option or something, we should probably move this -- cgit v1.2.3 From c3dd1238c50424231bac682f08b43fc4a318a148 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Tue, 16 Nov 2010 16:30:53 -0800 Subject: Small cleanup of the release task --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 9da84ee49b..7dc884f27b 100644 --- a/Rakefile +++ b/Rakefile @@ -12,7 +12,7 @@ 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", "git: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. -- cgit v1.2.3 From 646e5202e001a7c12247ce66dc85b4edde50f25c Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 17 Nov 2010 10:27:44 -0200 Subject: Typo fixed --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 7dc884f27b..8c72312f28 100644 --- a/Rakefile +++ b/Rakefile @@ -172,7 +172,7 @@ end # # 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 +# 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. # -- cgit v1.2.3 From 884e3506d2985d330badcb87ce070ee2b5de0d78 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 17 Nov 2010 19:35:58 -0200 Subject: Bump builder to 3.0.0 --- Rakefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 8c72312f28..134dcb79bf 100644 --- a/Rakefile +++ b/Rakefile @@ -51,6 +51,7 @@ task :default => %w(test test:isolated) PROJECTS.each do |project| system(%(cd #{project} && #{$0} #{task_name})) || errors << project end + system(%(#{$0} #{task_name})) || errors << 'rails' if task_name == 'gem' fail("Errors in #{errors.join(', ')}") unless errors.empty? end end -- cgit v1.2.3 From 08eee5ce203a151798660d1aea26fa136d96a304 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 17 Nov 2010 20:06:19 -0200 Subject: Fix stupid error --- Rakefile | 1 - 1 file changed, 1 deletion(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 134dcb79bf..8c72312f28 100644 --- a/Rakefile +++ b/Rakefile @@ -51,7 +51,6 @@ task :default => %w(test test:isolated) PROJECTS.each do |project| system(%(cd #{project} && #{$0} #{task_name})) || errors << project end - system(%(#{$0} #{task_name})) || errors << 'rails' if task_name == 'gem' fail("Errors in #{errors.join(', ')}") unless errors.empty? end end -- cgit v1.2.3