summaryrefslogtreecommitdiff
path: root/lib/chef/resource/scm.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/scm.rb')
-rw-r--r--lib/chef/resource/scm.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/chef/resource/scm.rb b/lib/chef/resource/scm.rb
index d9a372900e..91782e4114 100644
--- a/lib/chef/resource/scm.rb
+++ b/lib/chef/resource/scm.rb
@@ -32,12 +32,14 @@ class Chef
@destination = name
@resource_name = :scm
@enable_submodules = false
+ @enable_checkout = true
@revision = "HEAD"
@remote = "origin"
@ssh_wrapper = nil
@depth = nil
@allowed_actions.push(:checkout, :export, :sync, :diff, :log)
@action = [:sync]
+ @checkout_branch = "deploy"
end
def destination(arg=nil)
@@ -130,6 +132,14 @@ class Chef
)
end
+ def enable_checkout(arg=nil)
+ set_or_return(
+ :enable_checkout,
+ arg,
+ :kind_of => [TrueClass, FalseClass]
+ )
+ end
+
def remote(arg=nil)
set_or_return(
:remote,
@@ -154,6 +164,14 @@ class Chef
)
end
+ def checkout_branch(arg=nil)
+ set_or_return(
+ :checkout_branch,
+ arg,
+ :kind_of => String
+ )
+ end
+
end
end
end