fix update manager check update

This commit is contained in:
manson 2014-08-20 16:15:49 +08:00
parent 561a8b210b
commit 6851051af5
1 changed files with 1 additions and 3 deletions

View File

@ -82,9 +82,7 @@ class Admin::SitesController < OrbitAdminController
end end
def check_updates def check_updates
if (@current_tag.eql?(@latest_tag) == false)
%x(git fetch origin) %x(git fetch origin)
end
@new_updates = %x(git log #{@branch}..origin/#{@branch} --pretty=format:"%ad','%s" --date=short).split("\n").map{|log| log.gsub("'","").split(",")}.to_json @new_updates = %x(git log #{@branch}..origin/#{@branch} --pretty=format:"%ad','%s" --date=short).split("\n").map{|log| log.gsub("'","").split(",")}.to_json
render :json => @new_updates render :json => @new_updates
end end