[abf/abf-ideas#52] fixed: increasing release tag at mass build
This commit is contained in:
parent
e5db817583
commit
89cd764146
|
@ -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)
|
if project = Project.joins(:repositories).where('repositories.id in (?)', save_to_platform.repository_ids).find_by_name(name)
|
||||||
begin
|
begin
|
||||||
return if self.reload.stop_build
|
return if self.reload.stop_build
|
||||||
|
increase_rt = increase_release_tag?
|
||||||
arches_list.each do |arch|
|
arches_list.each do |arch|
|
||||||
rep_id = (project.repository_ids & save_to_platform.repository_ids).first
|
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
|
end
|
||||||
rescue RuntimeError, Exception
|
rescue RuntimeError, Exception
|
||||||
end
|
end
|
||||||
|
|
|
@ -162,7 +162,7 @@ class Project < ActiveRecord::Base
|
||||||
#path #share by NFS
|
#path #share by NFS
|
||||||
end
|
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
|
build_for_platform = mass_build.build_for_platform
|
||||||
save_to_platform = mass_build.save_to_platform
|
save_to_platform = mass_build.save_to_platform
|
||||||
user = mass_build.user
|
user = mass_build.user
|
||||||
|
@ -180,7 +180,7 @@ class Project < ActiveRecord::Base
|
||||||
default_branch
|
default_branch
|
||||||
end
|
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|
|
build_list = build_lists.build do |bl|
|
||||||
bl.save_to_platform = save_to_platform
|
bl.save_to_platform = save_to_platform
|
||||||
|
|
Loading…
Reference in New Issue