Rescued nil when there are no tags
This commit is contained in:
parent
941833e4d2
commit
2725aefb71
|
@ -191,7 +191,7 @@ class Admin::SitesController < OrbitBackendController
|
|||
|
||||
def git_tags
|
||||
@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
|
||||
|
|
Loading…
Reference in New Issue