Merge branch 'feature/project-export' of gitlab.com:gitlab-org/gitlab-ce into feature/project-import
This commit is contained in:
commit
41f9d9d9ca
|
@ -9,5 +9,13 @@ module Gitlab
|
|||
def storage_path
|
||||
File.join(Settings.shared['path'], 'tmp/project_exports')
|
||||
end
|
||||
|
||||
def project_filename
|
||||
"project.json"
|
||||
end
|
||||
|
||||
def project_bundle_filename
|
||||
"project.bundle"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ module Gitlab
|
|||
def initialize(project:, shared:)
|
||||
@project = project
|
||||
@shared = shared
|
||||
@full_path = File.join(@shared.export_path, project_filename)
|
||||
@full_path = File.join(@shared.export_path, ImportExport.project_filename)
|
||||
end
|
||||
|
||||
def save
|
||||
|
@ -20,11 +20,6 @@ module Gitlab
|
|||
|
||||
private
|
||||
|
||||
# TODO remove magic keyword and move it to a shared config
|
||||
def project_filename
|
||||
"project.json"
|
||||
end
|
||||
|
||||
def project_json_tree
|
||||
@project.to_json(Gitlab::ImportExport::ImportExportReader.new(shared: @shared).project_tree)
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@ module Gitlab
|
|||
|
||||
def bundle
|
||||
return false if @project.empty_repo?
|
||||
@full_path = File.join(@shared.export_path, project_filename)
|
||||
@full_path = File.join(@shared.export_path, ImportExport.project_bundle_filename)
|
||||
bundle_to_disk
|
||||
end
|
||||
|
||||
|
@ -26,11 +26,6 @@ module Gitlab
|
|||
false
|
||||
end
|
||||
|
||||
# TODO remove magic keyword and move it to a shared config
|
||||
def project_filename
|
||||
"project.bundle"
|
||||
end
|
||||
|
||||
def path_to_repo
|
||||
@project.repository.path_to_repo
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue