Inform the kernel about project git address

This commit is contained in:
Vladimir Sharshov 2012-08-09 17:56:45 +04:00
parent 0eb85654d5
commit f4b3c53362
2 changed files with 7 additions and 2 deletions

View File

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

View File

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