diff --git a/app/models/mass_build.rb b/app/models/mass_build.rb index 1515e5106..ff29c772a 100644 --- a/app/models/mass_build.rb +++ b/app/models/mass_build.rb @@ -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 diff --git a/app/models/project.rb b/app/models/project.rb index 0006bb175..f1ddf3036 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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