diff options
author | Badlop <badlop@process-one.net> | 2021-07-15 20:54:56 +0200 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2021-07-16 13:36:17 +0200 |
commit | 72e069d9ec0f6402a74781a47afc441263d8e19d (patch) | |
tree | adbff8ecf600788a5273a5ac69c9bb9bf8e61f00 /mix.exs | |
parent | Add sql to package files (#3251) (diff) |
Get ejabberd version from vars.config
Diffstat (limited to 'mix.exs')
-rw-r--r-- | mix.exs | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -3,7 +3,7 @@ defmodule Ejabberd.Mixfile do def project do [app: :ejabberd, - version: "21.4.0", + version: version(), description: description(), elixir: "~> 1.4", elixirc_paths: ["lib"], @@ -17,6 +17,14 @@ defmodule Ejabberd.Mixfile do deps: deps()] end + def version 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 + vsn -> String.replace(:erlang.list_to_binary(vsn), ".0", ".") + end + end + def description do """ Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server) |