lib/rim/upload_module_helper.rb in esr-rim-1.2.2 vs lib/rim/upload_module_helper.rb in esr-rim-1.3.0
- old
+ new
@@ -28,17 +28,27 @@
tmp_git_path = clone_or_fetch_repository(remote_path, module_tmp_git_path(@remote_path))
RIM::git_session(tmp_git_path) do |dest|
local_branch = nil
remote_branch = nil
infos = nil
+ if @module_info.subdir
+ dest_path = File.join([tmp_git_path] + @module_info.subdir.split("/"))
+ else
+ dest_path = tmp_git_path
+ end
RIM::git_session(@ws_root) do |src|
infos = get_branches_and_revision_infos(src, dest, parent_sha1, sha1s)
if infos.branches.size == 1
remote_branch = infos.branches[0]
if dest.has_remote_branch?(remote_branch)
infos.rev_infos.each do |rev_info|
local_branch = create_update_branch(dest, infos.parent_sha1, rev_info.src_sha1) if !local_branch
- copy_revision_files(src, rev_info.src_sha1, tmp_git_path, rev_info.rim_info.ignores)
+ copy_revision_files(
+ src,
+ rev_info.src_sha1,
+ dest_path,
+ rev_info.rim_info.ignores
+ )
commit_changes(dest, local_branch, rev_info.src_sha1, rev_info.message)
end
else
raise RimException.new("The target revision '#{@module_info.target_revision}' of module #{@module_info.local_path} is not a branch. No push can be performed.")
end