mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
When vsn is an exact tag, append .0 to satisfy SemVer
This commit is contained in:
parent
e3875482ba
commit
8e553decb0
3
mix.exs
3
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")
|
||||
<<head::binary, ".0">>
|
||||
vsn -> String.replace(:erlang.list_to_binary(vsn), ~r/0+([0-9])/, "\\1")
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user