Fix num_components by tree_repo #15

Open
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+2 −2
Diff settings

Always

Just for now

@@ -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