aboutsummaryrefslogtreecommitdiffstats
path: root/railties/fresh_rakefile
diff options
context:
space:
mode:
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