aboutsummaryrefslogtreecommitdiff
path: root/mix.exs
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2021-07-15 20:54:56 +0200
committerBadlop <badlop@process-one.net>2021-07-16 13:36:17 +0200
commit72e069d9ec0f6402a74781a47afc441263d8e19d (patch)
treeadbff8ecf600788a5273a5ac69c9bb9bf8e61f00 /mix.exs
parentAdd sql to package files (#3251) (diff)
Get ejabberd version from vars.config
Diffstat (limited to 'mix.exs')
-rw-r--r--mix.exs10
1 files changed, 9 insertions, 1 deletions
diff --git a/mix.exs b/mix.exs
index e029c911b..669401560 100644
--- a/mix.exs
+++ b/mix.exs
@@ -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)