cevian-chef-deploy 0.2.4 → 0.2.5
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.
- data/lib/chef-deploy/cached_deploy.rb +6 -1
- data/lib/chef-deploy/cached_deploy_symfony.rb +0 -2
- data/lib/chef-deploy/git.rb +1 -1
- data/lib/chef-deploy.rb +11 -1
- metadata +1 -1
@@ -11,7 +11,12 @@ class CachedDeploy
|
|
11
11
|
if @configuration[:revision] == ''
|
12
12
|
@configuration[:revision] = source.query_revision(@configuration[:branch]) {|cmd| run_with_result "#{cmd}"}
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
|
+
if check_current_revision_and_noop_if_same @configuration[:revision]
|
16
|
+
Chef::Log.info "skipping deploy, no updates"
|
17
|
+
return false
|
18
|
+
end
|
19
|
+
|
15
20
|
Chef::Log.info "ensuring proper ownership"
|
16
21
|
chef_run("chown -R #{user}:#{group} #{@configuration[:deploy_to]}")
|
17
22
|
|
data/lib/chef-deploy/git.rb
CHANGED
@@ -14,7 +14,7 @@ class Git
|
|
14
14
|
|
15
15
|
def git
|
16
16
|
res = configuration[:git_ssh_wrapper] ? "GIT_SSH=#{configuration[:git_ssh_wrapper]} git" : 'git'
|
17
|
-
res = "sudo -u #{configuration[:
|
17
|
+
res = "sudo -u #{configuration[:git_user]} #{res}" if configuration[:git_user]
|
18
18
|
res
|
19
19
|
end
|
20
20
|
|
data/lib/chef-deploy.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), 'chef-deploy/subversion')
|
2
2
|
require File.join(File.dirname(__FILE__), 'chef-deploy/git')
|
3
3
|
require File.join(File.dirname(__FILE__), 'chef-deploy/cached_deploy')
|
4
|
+
require File.join(File.dirname(__FILE__), 'chef-deploy/cached_deploy_symfony')
|
4
5
|
|
5
6
|
# deploy "/data/#{app}" do
|
6
7
|
# repo "git://github.com/engineyard/rack-app.git"
|
@@ -82,6 +83,14 @@ class Chef
|
|
82
83
|
)
|
83
84
|
end
|
84
85
|
|
86
|
+
def git_user(arg=nil)
|
87
|
+
set_or_return(
|
88
|
+
:git_user,
|
89
|
+
arg,
|
90
|
+
:kind_of => [ String ]
|
91
|
+
)
|
92
|
+
end
|
93
|
+
|
85
94
|
def group(arg=nil)
|
86
95
|
set_or_return(
|
87
96
|
:group,
|
@@ -214,7 +223,8 @@ class Chef
|
|
214
223
|
:scm => @new_resource.scm || 'git',
|
215
224
|
:node => @node,
|
216
225
|
:new_resource => @new_resource,
|
217
|
-
:git_ssh_wrapper => @git_ssh_wrapper
|
226
|
+
:git_ssh_wrapper => @git_ssh_wrapper,
|
227
|
+
:git_user => @new_resource.git_user || @new_resource.user
|
218
228
|
end
|
219
229
|
|
220
230
|
def action_deploy
|