capistrano 3.4.1 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +7 -5
  3. data/.rubocop.yml +49 -0
  4. data/.travis.yml +5 -4
  5. data/CHANGELOG.md +72 -9
  6. data/CONTRIBUTING.md +61 -93
  7. data/DEVELOPMENT.md +122 -0
  8. data/Gemfile +2 -2
  9. data/LICENSE.txt +1 -1
  10. data/README.md +121 -43
  11. data/RELEASING.md +16 -0
  12. data/Rakefile +4 -1
  13. data/bin/cap +1 -1
  14. data/capistrano.gemspec +16 -21
  15. data/features/doctor.feature +11 -0
  16. data/features/step_definitions/assertions.rb +17 -17
  17. data/features/step_definitions/cap_commands.rb +0 -1
  18. data/features/step_definitions/setup.rb +12 -8
  19. data/features/support/env.rb +5 -5
  20. data/features/support/remote_command_helpers.rb +8 -6
  21. data/features/support/vagrant_helpers.rb +5 -4
  22. data/issue_template.md +21 -0
  23. data/lib/Capfile +5 -1
  24. data/lib/capistrano/all.rb +9 -10
  25. data/lib/capistrano/application.rb +36 -26
  26. data/lib/capistrano/configuration.rb +56 -41
  27. data/lib/capistrano/configuration/empty_filter.rb +9 -0
  28. data/lib/capistrano/configuration/filter.rb +18 -47
  29. data/lib/capistrano/configuration/host_filter.rb +30 -0
  30. data/lib/capistrano/configuration/null_filter.rb +9 -0
  31. data/lib/capistrano/configuration/plugin_installer.rb +33 -0
  32. data/lib/capistrano/configuration/question.rb +10 -7
  33. data/lib/capistrano/configuration/role_filter.rb +30 -0
  34. data/lib/capistrano/configuration/server.rb +22 -23
  35. data/lib/capistrano/configuration/servers.rb +6 -7
  36. data/lib/capistrano/configuration/variables.rb +136 -0
  37. data/lib/capistrano/defaults.rb +13 -3
  38. data/lib/capistrano/deploy.rb +1 -1
  39. data/lib/capistrano/doctor.rb +5 -0
  40. data/lib/capistrano/doctor/environment_doctor.rb +19 -0
  41. data/lib/capistrano/doctor/gems_doctor.rb +45 -0
  42. data/lib/capistrano/doctor/output_helpers.rb +79 -0
  43. data/lib/capistrano/doctor/variables_doctor.rb +66 -0
  44. data/lib/capistrano/dotfile.rb +1 -2
  45. data/lib/capistrano/dsl.rb +12 -14
  46. data/lib/capistrano/dsl/env.rb +11 -42
  47. data/lib/capistrano/dsl/paths.rb +12 -13
  48. data/lib/capistrano/dsl/stages.rb +2 -4
  49. data/lib/capistrano/dsl/task_enhancements.rb +5 -7
  50. data/lib/capistrano/framework.rb +1 -1
  51. data/lib/capistrano/git.rb +17 -9
  52. data/lib/capistrano/hg.rb +4 -4
  53. data/lib/capistrano/i18n.rb +24 -24
  54. data/lib/capistrano/immutable_task.rb +29 -0
  55. data/lib/capistrano/install.rb +1 -1
  56. data/lib/capistrano/plugin.rb +95 -0
  57. data/lib/capistrano/scm.rb +7 -20
  58. data/lib/capistrano/setup.rb +19 -5
  59. data/lib/capistrano/svn.rb +9 -5
  60. data/lib/capistrano/tasks/console.rake +4 -8
  61. data/lib/capistrano/tasks/deploy.rake +75 -62
  62. data/lib/capistrano/tasks/doctor.rake +19 -0
  63. data/lib/capistrano/tasks/framework.rake +13 -14
  64. data/lib/capistrano/tasks/git.rake +10 -11
  65. data/lib/capistrano/tasks/hg.rake +7 -7
  66. data/lib/capistrano/tasks/install.rake +14 -15
  67. data/lib/capistrano/tasks/svn.rake +7 -7
  68. data/lib/capistrano/templates/Capfile +3 -3
  69. data/lib/capistrano/templates/deploy.rb.erb +6 -5
  70. data/lib/capistrano/upload_task.rb +1 -1
  71. data/lib/capistrano/version.rb +1 -1
  72. data/lib/capistrano/version_validator.rb +4 -6
  73. data/spec/integration/dsl_spec.rb +286 -239
  74. data/spec/integration_spec_helper.rb +3 -5
  75. data/spec/lib/capistrano/application_spec.rb +22 -14
  76. data/spec/lib/capistrano/configuration/empty_filter_spec.rb +17 -0
  77. data/spec/lib/capistrano/configuration/filter_spec.rb +82 -84
  78. data/spec/lib/capistrano/configuration/host_filter_spec.rb +61 -0
  79. data/spec/lib/capistrano/configuration/null_filter_spec.rb +17 -0
  80. data/spec/lib/capistrano/configuration/question_spec.rb +12 -16
  81. data/spec/lib/capistrano/configuration/role_filter_spec.rb +64 -0
  82. data/spec/lib/capistrano/configuration/server_spec.rb +102 -110
  83. data/spec/lib/capistrano/configuration/servers_spec.rb +124 -141
  84. data/spec/lib/capistrano/configuration_spec.rb +150 -61
  85. data/spec/lib/capistrano/doctor/environment_doctor_spec.rb +44 -0
  86. data/spec/lib/capistrano/doctor/gems_doctor_spec.rb +61 -0
  87. data/spec/lib/capistrano/doctor/output_helpers_spec.rb +47 -0
  88. data/spec/lib/capistrano/doctor/variables_doctor_spec.rb +79 -0
  89. data/spec/lib/capistrano/dsl/paths_spec.rb +58 -50
  90. data/spec/lib/capistrano/dsl/task_enhancements_spec.rb +62 -32
  91. data/spec/lib/capistrano/dsl_spec.rb +6 -8
  92. data/spec/lib/capistrano/git_spec.rb +35 -7
  93. data/spec/lib/capistrano/hg_spec.rb +14 -5
  94. data/spec/lib/capistrano/immutable_task_spec.rb +31 -0
  95. data/spec/lib/capistrano/plugin_spec.rb +84 -0
  96. data/spec/lib/capistrano/scm_spec.rb +6 -7
  97. data/spec/lib/capistrano/svn_spec.rb +40 -14
  98. data/spec/lib/capistrano/upload_task_spec.rb +7 -7
  99. data/spec/lib/capistrano/version_validator_spec.rb +37 -45
  100. data/spec/lib/capistrano_spec.rb +2 -3
  101. data/spec/spec_helper.rb +8 -8
  102. data/spec/support/Vagrantfile +9 -10
  103. data/spec/support/tasks/database.rake +3 -3
  104. data/spec/support/tasks/fail.rake +4 -3
  105. data/spec/support/tasks/failed.rake +2 -2
  106. data/spec/support/tasks/plugin.rake +6 -0
  107. data/spec/support/tasks/root.rake +4 -4
  108. data/spec/support/test_app.rb +31 -30
  109. metadata +93 -14
@@ -1,13 +1,15 @@
1
1
  load File.expand_path("../tasks/svn.rake", __FILE__)
2
2
 
3
- require 'capistrano/scm'
3
+ require "capistrano/scm"
4
4
 
5
5
  class Capistrano::Svn < Capistrano::SCM
6
-
7
6
  # execute svn in context with arguments
8
7
  def svn(*args)
9
8
  args.unshift(:svn)
10
- context.execute *args
9
+ args.push "--username #{fetch(:svn_username)}" if fetch(:svn_username)
10
+ args.push "--password #{fetch(:svn_password)}" if fetch(:svn_password)
11
+ args.push "--revision #{fetch(:svn_revision)}" if fetch(:svn_revision)
12
+ context.execute(*args)
11
13
  end
12
14
 
13
15
  module DefaultStrategy
@@ -16,7 +18,9 @@ class Capistrano::Svn < Capistrano::SCM
16
18
  end
17
19
 
18
20
  def check
19
- test! :svn, :info, repo_url
21
+ svn_username = fetch(:svn_username) ? "--username #{fetch(:svn_username)}" : ""
22
+ svn_password = fetch(:svn_password) ? "--password #{fetch(:svn_password)}" : ""
23
+ test! :svn, :info, repo_url, svn_username, svn_password
20
24
  end
21
25
 
22
26
  def clone
@@ -28,7 +32,7 @@ class Capistrano::Svn < Capistrano::SCM
28
32
  end
29
33
 
30
34
  def release
31
- svn :export, '--force', '.', release_path
35
+ svn :export, "--force", ".", release_path
32
36
  end
33
37
 
34
38
  def fetch_revision
@@ -1,20 +1,16 @@
1
- desc 'Execute remote commands'
1
+ desc "Execute remote commands"
2
2
  task :console do
3
3
  stage = fetch(:stage)
4
- puts I18n.t('console.welcome', scope: :capistrano, stage: stage)
4
+ puts I18n.t("console.welcome", scope: :capistrano, stage: stage)
5
5
  loop do
6
6
  print "#{stage}> "
7
7
 
8
- if input = $stdin.gets
9
- command = input.chomp
10
- else
11
- command = 'exit'
12
- end
8
+ command = (input = $stdin.gets) ? input.chomp : "exit"
13
9
 
14
10
  next if command.empty?
15
11
 
16
12
  if %w{quit exit q}.include? command
17
- puts t('console.bye')
13
+ puts t("console.bye")
18
14
  break
19
15
  else
20
16
  begin
@@ -1,70 +1,90 @@
1
1
  namespace :deploy do
2
-
3
2
  task :starting do
4
- invoke 'deploy:check'
5
- invoke 'deploy:set_previous_revision'
3
+ invoke "deploy:print_config_variables" if fetch(:print_config_variables, false)
4
+ invoke "deploy:check"
5
+ invoke "deploy:set_previous_revision"
6
+ end
7
+
8
+ task :print_config_variables do
9
+ puts
10
+ puts "------- Printing current config variables -------"
11
+ env.keys.each do |config_variable_key|
12
+ if is_question?(config_variable_key)
13
+ puts "#{config_variable_key.inspect} => Question (awaits user input on next fetch(#{config_variable_key.inspect}))"
14
+ else
15
+ puts "#{config_variable_key.inspect} => #{fetch(config_variable_key).inspect}"
16
+ end
17
+ end
18
+
19
+ puts
20
+ puts "------- Printing current config variables of SSHKit mechanism -------"
21
+ puts env.backend.config.inspect
22
+ # puts env.backend.config.backend.config.ssh_options.inspect
23
+ # puts env.backend.config.command_map.defaults.inspect
24
+
25
+ puts
6
26
  end
7
27
 
8
- task :updating => :new_release_path do
28
+ task updating: :new_release_path do
9
29
  invoke "#{scm}:create_release"
10
30
  invoke "deploy:set_current_revision"
11
- invoke 'deploy:symlink:shared'
31
+ invoke "deploy:symlink:shared"
12
32
  end
13
33
 
14
34
  task :reverting do
15
- invoke 'deploy:revert_release'
35
+ invoke "deploy:revert_release"
16
36
  end
17
37
 
18
38
  task :publishing do
19
- invoke 'deploy:symlink:release'
39
+ invoke "deploy:symlink:release"
20
40
  end
21
41
 
22
42
  task :finishing do
23
- invoke 'deploy:cleanup'
43
+ invoke "deploy:cleanup"
24
44
  end
25
45
 
26
46
  task :finishing_rollback do
27
- invoke 'deploy:cleanup_rollback'
47
+ invoke "deploy:cleanup_rollback"
28
48
  end
29
49
 
30
50
  task :finished do
31
- invoke 'deploy:log_revision'
51
+ invoke "deploy:log_revision"
32
52
  end
33
53
 
34
- desc 'Check required files and directories exist'
54
+ desc "Check required files and directories exist"
35
55
  task :check do
36
56
  invoke "#{scm}:check"
37
- invoke 'deploy:check:directories'
38
- invoke 'deploy:check:linked_dirs'
39
- invoke 'deploy:check:make_linked_dirs'
40
- invoke 'deploy:check:linked_files'
57
+ invoke "deploy:check:directories"
58
+ invoke "deploy:check:linked_dirs"
59
+ invoke "deploy:check:make_linked_dirs"
60
+ invoke "deploy:check:linked_files"
41
61
  end
42
62
 
43
63
  namespace :check do
44
- desc 'Check shared and release directories exist'
64
+ desc "Check shared and release directories exist"
45
65
  task :directories do
46
66
  on release_roles :all do
47
- execute :mkdir, '-p', shared_path, releases_path
67
+ execute :mkdir, "-p", shared_path, releases_path
48
68
  end
49
69
  end
50
70
 
51
- desc 'Check directories to be linked exist in shared'
71
+ desc "Check directories to be linked exist in shared"
52
72
  task :linked_dirs do
53
73
  next unless any? :linked_dirs
54
74
  on release_roles :all do
55
- execute :mkdir, '-p', linked_dirs(shared_path)
75
+ execute :mkdir, "-p", linked_dirs(shared_path)
56
76
  end
57
77
  end
58
78
 
59
- desc 'Check directories of files to be linked exist in shared'
79
+ desc "Check directories of files to be linked exist in shared"
60
80
  task :make_linked_dirs do
61
81
  next unless any? :linked_files
62
- on release_roles :all do |host|
63
- execute :mkdir, '-p', linked_file_dirs(shared_path)
82
+ on release_roles :all do |_host|
83
+ execute :mkdir, "-p", linked_file_dirs(shared_path)
64
84
  end
65
85
  end
66
86
 
67
- desc 'Check files to be linked exist in shared'
87
+ desc "Check files to be linked exist in shared"
68
88
  task :linked_files do
69
89
  next unless any? :linked_files
70
90
  on release_roles :all do |host|
@@ -79,64 +99,58 @@ namespace :deploy do
79
99
  end
80
100
 
81
101
  namespace :symlink do
82
- desc 'Symlink release to current'
102
+ desc "Symlink release to current"
83
103
  task :release do
84
104
  on release_roles :all do
85
105
  tmp_current_path = release_path.parent.join(current_path.basename)
86
- execute :ln, '-s', release_path, tmp_current_path
106
+ execute :ln, "-s", release_path, tmp_current_path
87
107
  execute :mv, tmp_current_path, current_path.parent
88
108
  end
89
109
  end
90
110
 
91
- desc 'Symlink files and directories from shared to release'
111
+ desc "Symlink files and directories from shared to release"
92
112
  task :shared do
93
- invoke 'deploy:symlink:linked_files'
94
- invoke 'deploy:symlink:linked_dirs'
113
+ invoke "deploy:symlink:linked_files"
114
+ invoke "deploy:symlink:linked_dirs"
95
115
  end
96
116
 
97
- desc 'Symlink linked directories'
117
+ desc "Symlink linked directories"
98
118
  task :linked_dirs do
99
119
  next unless any? :linked_dirs
100
120
  on release_roles :all do
101
- execute :mkdir, '-p', linked_dir_parents(release_path)
121
+ execute :mkdir, "-p", linked_dir_parents(release_path)
102
122
 
103
123
  fetch(:linked_dirs).each do |dir|
104
124
  target = release_path.join(dir)
105
125
  source = shared_path.join(dir)
106
- unless test "[ -L #{target} ]"
107
- if test "[ -d #{target} ]"
108
- execute :rm, '-rf', target
109
- end
110
- execute :ln, '-s', source, target
111
- end
126
+ next if test "[ -L #{target} ]"
127
+ execute :rm, "-rf", target if test "[ -d #{target} ]"
128
+ execute :ln, "-s", source, target
112
129
  end
113
130
  end
114
131
  end
115
132
 
116
- desc 'Symlink linked files'
133
+ desc "Symlink linked files"
117
134
  task :linked_files do
118
135
  next unless any? :linked_files
119
136
  on release_roles :all do
120
- execute :mkdir, '-p', linked_file_dirs(release_path)
137
+ execute :mkdir, "-p", linked_file_dirs(release_path)
121
138
 
122
139
  fetch(:linked_files).each do |file|
123
140
  target = release_path.join(file)
124
141
  source = shared_path.join(file)
125
- unless test "[ -L #{target} ]"
126
- if test "[ -f #{target} ]"
127
- execute :rm, target
128
- end
129
- execute :ln, '-s', source, target
130
- end
142
+ next if test "[ -L #{target} ]"
143
+ execute :rm, target if test "[ -f #{target} ]"
144
+ execute :ln, "-s", source, target
131
145
  end
132
146
  end
133
147
  end
134
148
  end
135
149
 
136
- desc 'Clean up old releases'
150
+ desc "Clean up old releases"
137
151
  task :cleanup do
138
152
  on release_roles :all do |host|
139
- releases = capture(:ls, '-xtr', releases_path).split
153
+ releases = capture(:ls, "-xtr", releases_path).split
140
154
  if releases.count >= fetch(:keep_releases)
141
155
  info t(:keeping_releases, host: host.to_s, keep_releases: fetch(:keep_releases), releases: releases.count)
142
156
  directories = (releases - releases.last(fetch(:keep_releases)))
@@ -144,7 +158,7 @@ namespace :deploy do
144
158
  directories_str = directories.map do |release|
145
159
  releases_path.join(release)
146
160
  end.join(" ")
147
- execute :rm, '-rf', directories_str
161
+ execute :rm, "-rf", directories_str
148
162
  else
149
163
  info t(:no_old_releases, host: host.to_s, keep_releases: fetch(:keep_releases))
150
164
  end
@@ -152,33 +166,33 @@ namespace :deploy do
152
166
  end
153
167
  end
154
168
 
155
- desc 'Remove and archive rolled-back release.'
169
+ desc "Remove and archive rolled-back release."
156
170
  task :cleanup_rollback do
157
171
  on release_roles(:all) do
158
- last_release = capture(:ls, '-xt', releases_path).split.first
172
+ last_release = capture(:ls, "-xt", releases_path).split.first
159
173
  last_release_path = releases_path.join(last_release)
160
174
  if test "[ `readlink #{current_path}` != #{last_release_path} ]"
161
- execute :tar, '-czf',
162
- deploy_path.join("rolled-back-release-#{last_release}.tar.gz"),
163
- last_release_path
164
- execute :rm, '-rf', last_release_path
175
+ execute :tar, "-czf",
176
+ deploy_path.join("rolled-back-release-#{last_release}.tar.gz"),
177
+ last_release_path
178
+ execute :rm, "-rf", last_release_path
165
179
  else
166
- debug 'Last release is the current release, skip cleanup_rollback.'
180
+ debug "Last release is the current release, skip cleanup_rollback."
167
181
  end
168
182
  end
169
183
  end
170
184
 
171
- desc 'Log details of the deploy'
185
+ desc "Log details of the deploy"
172
186
  task :log_revision do
173
187
  on release_roles(:all) do
174
188
  within releases_path do
175
- execute %{echo "#{revision_log_message}" >> #{revision_log}}
189
+ execute :echo, %Q{"#{revision_log_message}" >> #{revision_log}}
176
190
  end
177
191
  end
178
192
  end
179
193
 
180
- desc 'Revert to previous release timestamp'
181
- task :revert_release => :rollback_release_path do
194
+ desc "Revert to previous release timestamp"
195
+ task revert_release: :rollback_release_path do
182
196
  on release_roles(:all) do
183
197
  set(:revision_log_message, rollback_log_message)
184
198
  end
@@ -190,7 +204,7 @@ namespace :deploy do
190
204
 
191
205
  task :rollback_release_path do
192
206
  on release_roles(:all) do
193
- releases = capture(:ls, '-xt', releases_path).split
207
+ releases = capture(:ls, "-xt", releases_path).split
194
208
  if releases.count < 2
195
209
  error t(:cannot_rollback)
196
210
  exit 1
@@ -213,14 +227,13 @@ namespace :deploy do
213
227
 
214
228
  task :set_previous_revision do
215
229
  on release_roles(:all) do
216
- target = release_path.join('REVISION')
230
+ target = release_path.join("REVISION")
217
231
  if test "[ -f #{target} ]"
218
- set(:previous_revision, capture(:cat, target, '2>/dev/null'))
232
+ set(:previous_revision, capture(:cat, target, "2>/dev/null"))
219
233
  end
220
234
  end
221
235
  end
222
236
 
223
237
  task :restart
224
238
  task :failed
225
-
226
239
  end
@@ -0,0 +1,19 @@
1
+ desc "Display a Capistrano troubleshooting report (all doctor: tasks)"
2
+ task doctor: ["doctor:environment", "doctor:gems", "doctor:variables"]
3
+
4
+ namespace :doctor do
5
+ desc "Display Ruby environment details"
6
+ task :environment do
7
+ Capistrano::Doctor::EnvironmentDoctor.new.call
8
+ end
9
+
10
+ desc "Display Capistrano gem versions"
11
+ task :gems do
12
+ Capistrano::Doctor::GemsDoctor.new.call
13
+ end
14
+
15
+ desc "Display the values of all Capistrano variables"
16
+ task :variables do
17
+ Capistrano::Doctor::VariablesDoctor.new.call
18
+ end
19
+ end
@@ -1,50 +1,49 @@
1
1
  namespace :deploy do
2
-
3
- desc 'Start a deployment, make sure server(s) ready.'
2
+ desc "Start a deployment, make sure server(s) ready."
4
3
  task :starting do
5
4
  end
6
5
 
7
- desc 'Started'
6
+ desc "Started"
8
7
  task :started do
9
8
  end
10
9
 
11
- desc 'Update server(s) by setting up a new release.'
10
+ desc "Update server(s) by setting up a new release."
12
11
  task :updating do
13
12
  end
14
13
 
15
- desc 'Updated'
14
+ desc "Updated"
16
15
  task :updated do
17
16
  end
18
17
 
19
- desc 'Revert server(s) to previous release.'
18
+ desc "Revert server(s) to previous release."
20
19
  task :reverting do
21
20
  end
22
21
 
23
- desc 'Reverted'
22
+ desc "Reverted"
24
23
  task :reverted do
25
24
  end
26
25
 
27
- desc 'Publish the release.'
26
+ desc "Publish the release."
28
27
  task :publishing do
29
28
  end
30
29
 
31
- desc 'Published'
30
+ desc "Published"
32
31
  task :published do
33
32
  end
34
33
 
35
- desc 'Finish the deployment, clean up server(s).'
34
+ desc "Finish the deployment, clean up server(s)."
36
35
  task :finishing do
37
36
  end
38
37
 
39
- desc 'Finish the rollback, clean up server(s).'
38
+ desc "Finish the rollback, clean up server(s)."
40
39
  task :finishing_rollback do
41
40
  end
42
41
 
43
- desc 'Finished'
42
+ desc "Finished"
44
43
  task :finished do
45
44
  end
46
45
 
47
- desc 'Rollback to previous release.'
46
+ desc "Rollback to previous release."
48
47
  task :rollback do
49
48
  %w{ starting started
50
49
  reverting reverted
@@ -55,7 +54,7 @@ namespace :deploy do
55
54
  end
56
55
  end
57
56
 
58
- desc 'Deploy a new release.'
57
+ desc "Deploy a new release."
59
58
  task :deploy do
60
59
  set(:deploying, true)
61
60
  %w{ starting started
@@ -1,26 +1,25 @@
1
1
  namespace :git do
2
-
3
2
  def strategy
4
3
  @strategy ||= Capistrano::Git.new(self, fetch(:git_strategy, Capistrano::Git::DefaultStrategy))
5
4
  end
6
5
 
7
- set :git_environmental_variables, ->() {
6
+ set :git_environmental_variables, lambda {
8
7
  {
9
8
  git_askpass: "/bin/echo",
10
- git_ssh: "#{fetch(:tmp_dir)}/#{fetch(:application)}/git-ssh.sh"
9
+ git_ssh: "#{fetch(:tmp_dir)}/#{fetch(:application)}/git-ssh.sh"
11
10
  }
12
11
  }
13
12
 
14
- desc 'Upload the git wrapper script, this script guarantees that we can script git without getting an interactive prompt'
13
+ desc "Upload the git wrapper script, this script guarantees that we can script git without getting an interactive prompt"
15
14
  task :wrapper do
16
15
  on release_roles :all do
17
16
  execute :mkdir, "-p", "#{fetch(:tmp_dir)}/#{fetch(:application)}/"
18
17
  upload! StringIO.new("#!/bin/sh -e\nexec /usr/bin/ssh -o PasswordAuthentication=no -o StrictHostKeyChecking=no \"$@\"\n"), "#{fetch(:tmp_dir)}/#{fetch(:application)}/git-ssh.sh"
19
- execute :chmod, "+x", "#{fetch(:tmp_dir)}/#{fetch(:application)}/git-ssh.sh"
18
+ execute :chmod, "+rx", "#{fetch(:tmp_dir)}/#{fetch(:application)}/git-ssh.sh"
20
19
  end
21
20
  end
22
21
 
23
- desc 'Check that the repository is reachable'
22
+ desc "Check that the repository is reachable"
24
23
  task check: :'git:wrapper' do
25
24
  fetch(:branch)
26
25
  on release_roles :all do
@@ -30,7 +29,7 @@ namespace :git do
30
29
  end
31
30
  end
32
31
 
33
- desc 'Clone the repo to the cache'
32
+ desc "Clone the repo to the cache"
34
33
  task clone: :'git:wrapper' do
35
34
  on release_roles :all do
36
35
  if strategy.test
@@ -45,7 +44,7 @@ namespace :git do
45
44
  end
46
45
  end
47
46
 
48
- desc 'Update the repo mirror to reflect the origin state'
47
+ desc "Update the repo mirror to reflect the origin state"
49
48
  task update: :'git:clone' do
50
49
  on release_roles :all do
51
50
  within repo_path do
@@ -56,19 +55,19 @@ namespace :git do
56
55
  end
57
56
  end
58
57
 
59
- desc 'Copy repo to releases'
58
+ desc "Copy repo to releases"
60
59
  task create_release: :'git:update' do
61
60
  on release_roles :all do
62
61
  with fetch(:git_environmental_variables) do
63
62
  within repo_path do
64
- execute :mkdir, '-p', release_path
63
+ execute :mkdir, "-p", release_path
65
64
  strategy.release
66
65
  end
67
66
  end
68
67
  end
69
68
  end
70
69
 
71
- desc 'Determine the revision that will be deployed'
70
+ desc "Determine the revision that will be deployed"
72
71
  task :set_current_revision do
73
72
  on release_roles :all do
74
73
  within repo_path do