diff --git a/mix.exs b/mix.exs index bc3b798163..4f2b77a0c8 100644 --- a/mix.exs +++ b/mix.exs @@ -2,19 +2,6 @@ defmodule Trento.MixProject do use Mix.Project @version "1.1.0" - defp get_version do - case System.get_env("VERSION") do - nil -> get_version_from_git() - version -> version - end - end - - defp get_version_from_git do - case File.cwd!() |> Path.join("hack/get_version_from_git.sh") |> System.cmd([]) do - {version, 0} -> version |> String.trim("\n") - _ -> @version - end - end def project do [ @@ -136,4 +123,14 @@ defmodule Trento.MixProject do ] ] end + + defp get_version, do: + System.get_env("VERSION", get_version_from_git()) + + defp get_version_from_git do + case File.cwd!() |> Path.join("hack/get_version_from_git.sh") |> System.cmd([]) do + {version, 0} -> version |> String.trim("\n") + _ -> @version + end + end end