diff --git a/.app_version b/.app_version index 00d2c880..699c6c6d 100644 --- a/.app_version +++ b/.app_version @@ -1 +1 @@ -0.1.7.4 +0.1.8 diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a0246a9f..9f78ffb5 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -62,4 +62,8 @@ module ApplicationHelper CheckAppVersion.new.call end end + + def app_version + File.read('.app_version').strip + end end diff --git a/app/services/check_app_version.rb b/app/services/check_app_version.rb index 4cc0eeb3..745911f7 100644 --- a/app/services/check_app_version.rb +++ b/app/services/check_app_version.rb @@ -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 diff --git a/app/views/shared/_navbar.html.erb b/app/views/shared/_navbar.html.erb index 9cb9ee1d..aff0955a 100644 --- a/app/views/shared/_navbar.html.erb +++ b/app/views/shared/_navbar.html.erb @@ -13,7 +13,7 @@ <%= link_to 'DaWarIch', root_path, class: 'btn btn-ghost normal-case text-xl'%>
- 0.1.7.3 + <%= app_version %> <% if new_version_available? %>  New version available