aboutsummaryrefslogtreecommitdiffstats
path: root/railties/fresh_rakefile
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-08-03 15:02:31 +0000
committerJamis Buck <jamis@37signals.com>2005-08-03 15:02:31 +0000
commit3d4a32377651a13575ce6da84875af764fdbe339 (patch)
tree0349c2e07e8e7d9c92387e7515ad05e129a892dc /railties/fresh_rakefile
parent3fc8639b78417cffc112916537bb8249f8880394 (diff)
downloadrails-3d4a32377651a13575ce6da84875af764fdbe339.tar.gz
rails-3d4a32377651a13575ce6da84875af764fdbe339.tar.bz2
rails-3d4a32377651a13575ce6da84875af764fdbe339.zip
Add integration with SwitchTower (rake tasks, default deploy.rb recipe)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1968 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/fresh_rakefile')
-rwxr-xr-xrailties/fresh_rakefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/railties/fresh_rakefile b/railties/fresh_rakefile
index 34b0d24c4d..766a10237c 100755
--- a/railties/fresh_rakefile
+++ b/railties/fresh_rakefile
@@ -219,3 +219,28 @@ task :load_fixtures => :environment do
Fixtures.create_fixtures('test/fixtures', File.basename(fixture_file, '.*'))
end
end
+
+desc "Push the latest revision into production using the release manager"
+task :deploy do
+ system "script/switchtower -vvvv -r config/deploy -a deploy"
+end
+
+desc "Rollback to the release before the current release in production"
+task :rollback do
+ system "script/switchtower -vvvv -r config/deploy -a rollback"
+end
+
+desc "Enumerate all available deployment tasks"
+task :show_deploy_tasks do
+ system "script/switchtower -r config/deploy -a show_tasks"
+end
+
+desc "Execute a specific action using the release manager"
+task :remote_exec do
+ unless ENV['ACTION']
+ raise "Please specify an action (or comma separated list of actions) via the ACTION environment variable"
+ end
+
+ actions = ENV['ACTION'].split(",").map { |a| "-a #{a}" }.join(" ")
+ system "script/switchtower -vvvv -r config/deploy #{actions}"
+end