summaryrefslogtreecommitdiff
path: root/lib/tasks/deployment.rake
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks/deployment.rake')
-rw-r--r--lib/tasks/deployment.rake21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/tasks/deployment.rake b/lib/tasks/deployment.rake
new file mode 100644
index 00000000..3edd22eb
--- /dev/null
+++ b/lib/tasks/deployment.rake
@@ -0,0 +1,21 @@
+namespace :deploy do
+ desc "deploy to staging server"
+ task :staging => :spec do
+ #sh "cap staging deploy"
+ sh "cap staging deploy:migrations"
+ sh "curl http://staging.cakeside.com/ > /dev/null"
+ end
+ desc "deploy to production server"
+ 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}"
+ sh "cap production deploy:migrations"
+ sh "curl http://cakeside.com/ > /dev/null"
+ end
+ end
+end