From ba263fe35d12fa6a0c0e0b9975dbd635fc31deeb Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 23 Oct 2020 18:55:47 +0200 Subject: [PATCH] Fallback GitStatus version code to mix env value Signed-off-by: Thomas Citharel --- lib/service/git_status.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/service/git_status.ex b/lib/service/git_status.ex index 0d6e7a36b..92cc8eff1 100644 --- a/lib/service/git_status.ex +++ b/lib/service/git_status.ex @@ -9,8 +9,9 @@ defmodule Mobilizon.Service.GitStatus do String.trim(hash) _ -> - Logger.warn("Could not read git commit hash") - "UNKNOWN" + # Fallback on Mix version + Logger.warn("Could not read git commit hash, using Mix version code instead.") + Mix.Project.config()[:version] end) @doc """