Merge pull request #11032 from dacook/show-current-version2

Show current version2
This commit is contained in:
Maikel
2023-06-19 10:07:49 +10:00
committed by GitHub
2 changed files with 4 additions and 1 deletions

View File

@@ -1,3 +1,3 @@
%a{href:"https://github.com/openfoodfoundation/openfoodnetwork/releases", target: "_blank", title: t('.view_all_releases')}
=# Show the latest tag. If there are commits since the tag, show number of commits and an identifier. If the working tree is dirty, show 'modified'.
= `git describe --tags --dirty=-modified`
= Rails.application.config.x.git_version

View File

@@ -34,6 +34,9 @@ end
module Openfoodnetwork
class Application < Rails::Application
# Store a description of the current version, with linebreak trimmed
config.x.git_version = `git describe --tags --dirty=-modified`.strip
config.after_initialize do
# We need this here because the test env file loads before the Spree engine is loaded
Spree::Core::Engine.routes.default_url_options[:host] = ENV["SITE_URL"] if Rails.env == 'test'