[abf/abf-ideas#52] fixed: increasing release tag at mass build

This commit is contained in:
Vokhmin Alexey V 2014-01-14 23:13:26 +04:00
parent e5db817583
commit 89cd764146
2 changed files with 5 additions and 3 deletions

View File

@ -44,9 +44,11 @@ class MassBuild < ActiveRecord::Base
if project = Project.joins(:repositories).where('repositories.id in (?)', save_to_platform.repository_ids).find_by_name(name)
begin
return if self.reload.stop_build
increase_rt = increase_release_tag?
arches_list.each do |arch|
rep_id = (project.repository_ids & save_to_platform.repository_ids).first
project.build_for self, rep_id, arch
project.build_for self, rep_id, arch, 0, increase_rt
increase_rt = false
end
rescue RuntimeError, Exception
end

View File

@ -162,7 +162,7 @@ class Project < ActiveRecord::Base
#path #share by NFS
end
def build_for(mass_build, repository_id, arch = Arch.find_by_name('i586'), priority = 0)
def build_for(mass_build, repository_id, arch = Arch.find_by_name('i586'), priority = 0, increase_rt = false)
build_for_platform = mass_build.build_for_platform
save_to_platform = mass_build.save_to_platform
user = mass_build.user
@ -180,7 +180,7 @@ class Project < ActiveRecord::Base
default_branch
end
increase_release_tag(project_version, user, "MassBuild##{mass_build.id}: Increase release tag") if mass_build.increase_release_tag?
increase_release_tag(project_version, user, "MassBuild##{mass_build.id}: Increase release tag") if increase_rt
build_list = build_lists.build do |bl|
bl.save_to_platform = save_to_platform