Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix num_components by tree_repo #15

Merged
merged 1 commit into from Feb 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/capistrano/bundle_rsync/git.rb
Expand Up @@ -27,11 +27,11 @@ def create_release
within config.local_mirror_path do
if tree = fetch(:repo_tree)
stripped = tree.slice %r#^/?(.*?)/?$#, 1 # strip both side /
num_components = stripped.count('/')
num_components = stripped.count('/') + 1
execute :git, :archive, fetch(:branch), tree, "| tar -x --strip-components #{num_components} -f - -C ", "#{config.local_release_path}"
else
execute :git, :archive, fetch(:branch), '| tar -x -C', "#{config.local_release_path}"
end
end
end
end

Expand Down