mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge pull request #11032 from dacook/show-current-version2
Show current version2
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user