|
1 | | -namespace :wizarddev do |
2 | | - task :deploy do |
3 | | - if ENV['TARGET'] |
4 | | - Wizarddev::Heroku.load |
5 | | - Wizarddev::Heroku::Deploy.new(ENV['TARGET']).deploy! |
6 | | - else |
7 | | - Rake::Task["wizarddev:deploy:help"].invoke |
8 | | - end |
| 1 | +task :deploy do |
| 2 | + if ENV['TARGET'] |
| 3 | + Wizarddev::Heroku.load |
| 4 | + Wizarddev::Heroku::Deploy.new(ENV['TARGET']).deploy! |
| 5 | + else |
| 6 | + Rake::Task["deploy:help"].invoke |
9 | 7 | end |
| 8 | +end |
10 | 9 |
|
11 | | - namespace :deploy do |
12 | | - desc 'Deploy script usage information' |
13 | | - task :help do |
14 | | - puts 'Deploys the currently checked out revision to heroku.' |
15 | | - puts 'Reads the project\'s app.json file to determine tasks for a target.' |
16 | | - puts 'Tasks include:' |
17 | | - puts "\t Tag the release and pushes it to github" |
18 | | - puts "\t Deploy the release to Heroku" |
19 | | - puts "\t Execute commands remotely eg 'rake db:migrate'" |
20 | | - puts "\t Restart the app" |
21 | | - puts "\nUses the ~/.netrc file for authentication per the heroku toolbelt." |
22 | | - puts "\nusage: rake wizarddev:deploy TARGET=target_name" |
23 | | - puts "usage: rake wizarddev:deploy:{staging|production}" |
24 | | - |
25 | | - Wizarddev::Heroku.load |
26 | | - Wizarddev::Heroku::Deploy.check_auth_config |
27 | | - exit 0 |
28 | | - end |
| 10 | +namespace :deploy do |
| 11 | + desc 'Deploy script usage information' |
| 12 | + task :help do |
| 13 | + puts 'Deploys the currently checked out revision to heroku.' |
| 14 | + puts 'Reads the project\'s app.json file to determine tasks for a target.' |
| 15 | + puts 'Tasks include:' |
| 16 | + puts "\t Tag the release and pushes it to github" |
| 17 | + puts "\t Deploy the release to Heroku" |
| 18 | + puts "\t Execute commands remotely eg 'rake db:migrate'" |
| 19 | + puts "\t Restart the app" |
| 20 | + puts "\nUses the ~/.netrc file for authentication per the heroku toolbelt." |
| 21 | + puts "\nusage: rake deploy TARGET=target_name" |
| 22 | + puts "usage: rake deploy:{staging|production}" |
29 | 23 |
|
30 | | - desc 'Deploy to Production' |
31 | | - task :production do |
32 | | - Wizarddev::Heroku.load |
33 | | - Wizarddev::Heroku::Deploy.new(:production).deploy! |
34 | | - end |
| 24 | + Wizarddev::Heroku.load |
| 25 | + Wizarddev::Heroku::Deploy.check_auth_config |
| 26 | + exit 0 |
| 27 | + end |
35 | 28 |
|
36 | | - desc 'Deploy to Staging' |
37 | | - task :staging do |
38 | | - Wizarddev::Heroku.load |
39 | | - Wizarddev::Heroku::Deploy.new(:staging).deploy! |
40 | | - end |
| 29 | + desc 'Deploy to Production' |
| 30 | + task :production do |
| 31 | + Wizarddev::Heroku.load |
| 32 | + Wizarddev::Heroku::Deploy.new(:production).deploy! |
| 33 | + end |
41 | 34 |
|
| 35 | + desc 'Deploy to Staging' |
| 36 | + task :staging do |
| 37 | + Wizarddev::Heroku.load |
| 38 | + Wizarddev::Heroku::Deploy.new(:staging).deploy! |
42 | 39 | end |
| 40 | + |
43 | 41 | end |
44 | 42 |
|
0 commit comments