summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authormo k <mo@mokhan.ca>2012-06-02 06:56:53 -0600
committermo k <mo@mokhan.ca>2012-06-02 06:56:53 -0600
commit8db18c1a7c5aa1ee6c8d0b8991f1d07b60d850de (patch)
tree5c9169efef5a8f9e764e4740361174fc6f79e656 /Rakefile
parent3ce7caac589d1d30f8668611a1f54074fb12e07b (diff)
add rake task to deploy rake deploy:production and rake deploy:staging. PLEASE USE THESE TASKS not cap staging deploy
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile20
1 files changed, 11 insertions, 9 deletions
diff --git a/Rakefile b/Rakefile
index 35082351..11f0401d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -6,21 +6,23 @@ require 'rake'
Cake::Application.load_tasks
-task :deploy_live do
- sh "cap production deploy"
-end
-
task :install_keys do
sh "cp doc/keys/*.pem ~/.ssh/amazon-cakeside/"
end
namespace :deploy do
task :staging do
- #branch_name = "staging-#{Time.now.strftime('%Y-%m-%d-%T')}"
- #sh "git branch #{branch_name}"
- #sh "git push origin #{branch_name}"
- puts "staging is fun! #{branch_name}"
- #sh "cap staging deploy branch=#{branch_name}"
+ sh "cap staging deploy"
+ end
+ task :production, :tag do |t, args|
+ tag_to_deploy = args.tag
+ if tag_to_deploy.blank?
+ puts "please specify the name of the tag to deploy"
+ puts "E.g. rake deploy:production['staging-2012-06-02-1-mo-user-settings']"
+ else
+ puts "deploying to production from tag #{tag_to_deploy}"
+ sh "cap production deploy -s tag=#{tag_to_deploy}"
+ end
end
end