diff --git a/app/models/build_list.rb b/app/models/build_list.rb index f4fe54ffb..07cc933b8 100644 --- a/app/models/build_list.rb +++ b/app/models/build_list.rb @@ -216,8 +216,8 @@ class BuildList < ActiveRecord::Base def add_to_queue - #XML-RPC params: project_name, project_version, plname, arch, bplname, update_type, build_requires, id_web, include_repos, priority - @status ||= BuildServer.add_build_list project.name, project_version, save_to_platform.name, arch.name, (save_to_platform_id == build_for_platform_id ? '' : build_for_platform.name), update_type, build_requires, id, include_repos, priority + #XML-RPC params: project_name, project_version, plname, arch, bplname, update_type, build_requires, id_web, include_repos, priority, git_project_address + @status ||= BuildServer.add_build_list project.name, project_version, save_to_platform.name, arch.name, (save_to_platform_id == build_for_platform_id ? '' : build_for_platform.name), update_type, build_requires, id, include_repos, priority, project.git_project_address end def self.human_status(status) diff --git a/app/models/project.rb b/app/models/project.rb index 9cb779f53..2119a97f6 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -84,6 +84,11 @@ class Project < ActiveRecord::Base owner == user end + def git_project_address + host ||= EventLog.current_controller.request.host_with_port rescue ::Rosa::Application.config.action_mailer.default_url_options[:host] + Rails.application.routes.url_helpers.project_url(self.owner.uname, self.name, :host => host) + ".git" + end + def build_for(platform, repository_id, user, arch = 'i586', auto_publish = false, mass_build_id = nil, priority = 0) # Select main and project platform repository(contrib, non-free and etc) # If main does not exist, will connect only project platform repository