diff options
author | Badlop <badlop@process-one.net> | 2021-07-26 16:36:21 +0200 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2021-07-26 16:36:21 +0200 |
commit | 8e553decb0f0532772b3f0421fbba52be054ea38 (patch) | |
tree | 1e013b98e1c16c2fcb2932c0de9c38ac8b4ebc08 /mix.exs | |
parent | Remove stringprep override from mix.exs (diff) |
When vsn is an exact tag, append .0 to satisfy SemVer
Diffstat (limited to 'mix.exs')
-rw-r--r-- | mix.exs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |