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:
Carlos Martín Nieto 2012-02-10 16:27:27 +01:00
Родитель c8df74f79b
Коммит 6ef14147de
1 изменённых файлов: 1 добавлений и 1 удалений

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