Rescued nil when there are no tags

This commit is contained in:
Saurabh Bhatia 2014-03-14 11:14:51 +08:00
parent 941833e4d2
commit 2725aefb71
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ class Admin::SitesController < OrbitBackendController
def git_tags def git_tags
@current_tag = %x(git describe --tags).gsub("\n","") @current_tag = %x(git describe --tags).gsub("\n","")
@latest_tag = `git ls-remote --tags origin | awk '{print $2}'`.split(/\n/).last.gsub("refs/tags/","") @latest_tag = `git ls-remote --tags origin | awk '{print $2}'`.split(/\n/).last.gsub("refs/tags/","") rescue nil
end end
end end