25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Handle mix version when running docker-ejabberd/ecs/build.sh latest

This commit is contained in:
Badlop 2021-12-08 16:22:24 +01:00
parent 68ea5834c8
commit 0f9a0156c6

View File

@ -24,6 +24,7 @@ defmodule Ejabberd.MixProject do
case config(:vsn) do case config(:vsn) do
:false -> "0.0.0" # ./configure wasn't run: vars.config not created :false -> "0.0.0" # ./configure wasn't run: vars.config not created
'0.0' -> "0.0.0" # the full git repository wasn't downloaded '0.0' -> "0.0.0" # the full git repository wasn't downloaded
'latest.0' -> "0.0.0" # running 'docker-ejabberd/ecs/build.sh latest'
[_, _, ?., _, _] = x -> [_, _, ?., _, _] = x ->
head = String.replace(:erlang.list_to_binary(x), ~r/0+([0-9])/, "\\1") head = String.replace(:erlang.list_to_binary(x), ~r/0+([0-9])/, "\\1")
<<head::binary, ".0">> <<head::binary, ".0">>