lib/shaddox/shadow.rb in shaddox-0.0.28 vs lib/shaddox/shadow.rb in shaddox-0.0.29
- old
+ new
@@ -76,11 +76,11 @@
install 'git'
@git_installed = true
end
end
- def repo_deploy(repo_key, deploy_path, opts ={})
+ def repo_deploy(repo_key, deploy_path, opts ={}, &in_deploy_path_block)
keep_releases = opts[:keep_releases] || 5
repo = @repos[repo_key]
ensure_git()
ensure_parent_dir(deploy_path)
@@ -120,9 +120,11 @@
# Link ./current to the latest release
info 'Linking current to latest release', 1 if @debug
ln_s release_path, './current'
end
+
+ cd deploy_path, &in_deploy_path_block if block_given?
end
def install(package)
unless @installer
# TODO: Try to autodetect package manager