diff --git a/apps/block_scout_web/config/config.exs b/apps/block_scout_web/config/config.exs index 6b5d1fcd0d0f..60cc509a83ee 100644 --- a/apps/block_scout_web/config/config.exs +++ b/apps/block_scout_web/config/config.exs @@ -8,7 +8,8 @@ use Mix.Config # General application configuration config :block_scout_web, namespace: BlockScoutWeb, - ecto_repos: [Explorer.Repo] + ecto_repos: [Explorer.Repo], + version: System.get_env("BLOCKSCOUT_VERSION") config :block_scout_web, BlockScoutWeb.Chain, network: System.get_env("NETWORK"), diff --git a/apps/block_scout_web/lib/block_scout_web.ex b/apps/block_scout_web/lib/block_scout_web.ex index 68ff0c002ed1..9a4c6cab09ab 100644 --- a/apps/block_scout_web/lib/block_scout_web.ex +++ b/apps/block_scout_web/lib/block_scout_web.ex @@ -16,14 +16,7 @@ defmodule BlockScoutWeb do below. Instead, define any helper function in modules and import those modules here. """ - - # This is intentionally compiled in. Version is set - # at compile time, and we don't want to make a system - # env call to retreive it every time anyone loads any - # page. - @version System.get_env("BLOCKSCOUT_VERSION") || "unknown" - - def version(), do: @version + def version(), do: Application.get_env(:block_scout_web, :version) def controller do quote do