25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Get ejabberd version from vars.config

This commit is contained in:
Badlop 2021-07-15 20:54:56 +02:00
parent df8b0cb1a5
commit 72e069d9ec

10
mix.exs
View File

@ -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)