mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
Fix app_version check
This commit is contained in:
parent
efb4ecf19b
commit
b64301696e
4 changed files with 7 additions and 3 deletions
|
|
@ -1 +1 @@
|
|||
0.1.7.4
|
||||
0.1.8
|
||||
|
|
|
|||
|
|
@ -62,4 +62,8 @@ module ApplicationHelper
|
|||
CheckAppVersion.new.call
|
||||
end
|
||||
end
|
||||
|
||||
def app_version
|
||||
File.read('.app_version').strip
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@ class CheckAppVersion
|
|||
|
||||
def call
|
||||
latest_version = JSON.parse(Net::HTTP.get(URI.parse(@repo_url)))[0]['name']
|
||||
latest_version == @app_version
|
||||
latest_version != @app_version
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<%= link_to 'DaWarIch', root_path, class: 'btn btn-ghost normal-case text-xl'%>
|
||||
<div class="badge mx-4 <%= 'badge-outline' if new_version_available? %> ">
|
||||
<a href="https://github.com/Freika/dawarich/releases/latest" target="_blank">
|
||||
0.1.7.3
|
||||
<%= app_version %>
|
||||
<% if new_version_available? %>
|
||||
<span class="tooltip tooltip-bottom" data-tip="Check out Github releases!">
|
||||
 New version available
|
||||
|
|
|
|||
Loading…
Reference in a new issue