fix: configure BLOCKSCOUT_VERSION in a standard way

pull/1471/head
zachdaniel 6 years ago
parent 5b7567ed57
commit fb68e8ffdf
  1. 3
      apps/block_scout_web/config/config.exs
  2. 9
      apps/block_scout_web/lib/block_scout_web.ex

@ -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"),

@ -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

Loading…
Cancel
Save