зеркало из https://github.com/git/gitscm-old.git
Correctly identify latest stable git version
Maintenance releases for version n-1 and n-2 can have later dates than the latest stable n, so they're not a good way to determine the latest release. The latest release should be calculated using the version number alone.
This commit is contained in:
Родитель
c8df74f79b
Коммит
6ef14147de
2
app.rb
2
app.rb
|
@ -6,7 +6,7 @@ require './lib/version'
|
|||
class GitApp < Sinatra::Base
|
||||
|
||||
def get_version
|
||||
if v = Version.first(:order => [:created_at.desc])
|
||||
if v = Version.last(:order => [:version])
|
||||
@version = v.version
|
||||
@date = v.created_at.strftime("%Y-%m-%d")
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче