Sort project versions as numbers. Do not create duplicate build lists. Refs #test_prepare
This commit is contained in:
parent
ce8f7a8ec3
commit
d7702b9901
|
@ -64,7 +64,7 @@ class ProjectsController < ApplicationController
|
|||
uname, unixname = params[:git_repo].split('/')
|
||||
owner = User.find_by_uname(uname) || Group.find_by_uname(uname)
|
||||
project = Project.where(:owner_id => owner.id, :owner_type => owner.class).find_by_unixname!(unixname)
|
||||
project.delay.auto_build
|
||||
project.delay.auto_build # TODO don't queue duplicates
|
||||
|
||||
# p = params.delete_if{|k,v| k == 'controller' or k == 'action'}
|
||||
# ActiveSupport::Notifications.instrument("event_log.observer", :object => project, :message => p.inspect)
|
||||
|
|
|
@ -50,7 +50,7 @@ class Project < ActiveRecord::Base
|
|||
:arch => auto_build_list.arch,
|
||||
:project_version => collected_project_versions.last,
|
||||
:build_requires => true,
|
||||
:update_type => 'bugfix')
|
||||
:update_type => 'bugfix') unless build_lists.for_creation_date_period(Time.current - 15.seconds, Time.current).present?
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -65,7 +65,7 @@ class Project < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def tags
|
||||
self.git_repository.tags.sort_by(&:name)
|
||||
self.git_repository.tags.sort_by{|t| t.name.gsub(/[a-zA-Z.]+/, '').to_i}
|
||||
end
|
||||
|
||||
def members
|
||||
|
|
Loading…
Reference in New Issue