From 8e553decb0f0532772b3f0421fbba52be054ea38 Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 26 Jul 2021 16:36:21 +0200 Subject: [PATCH] When vsn is an exact tag, append .0 to satisfy SemVer --- mix.exs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mix.exs b/mix.exs index 9801b58f4..c33710b45 100644 --- a/mix.exs +++ b/mix.exs @@ -24,6 +24,9 @@ defmodule Ejabberd.MixProject do case config(:vsn) do :false -> "0.0.0" # ./configure wasn't run: vars.config not created '0.0' -> "0.0.0" # the full git repository wasn't downloaded + [_, _, ?., _, _] = x -> + head = String.replace(:erlang.list_to_binary(x), ~r/0+([0-9])/, "\\1") + <> vsn -> String.replace(:erlang.list_to_binary(vsn), ~r/0+([0-9])/, "\\1") end end