feat(agent): expose compile-time version
This commit is contained in:
parent
70923eebfa
commit
7ec38e0fd6
2 changed files with 8 additions and 18 deletions
|
|
@ -1,18 +1,8 @@
|
||||||
defmodule ProxmoxAgent do
|
defmodule ProxmoxAgent do
|
||||||
@moduledoc """
|
@moduledoc "Top-level namespace. Exposes the compiled version for reporting."
|
||||||
Documentation for `ProxmoxAgent`.
|
|
||||||
"""
|
|
||||||
|
|
||||||
@doc """
|
@version Mix.Project.config()[:version]
|
||||||
Hello world.
|
|
||||||
|
|
||||||
## Examples
|
@spec version() :: String.t()
|
||||||
|
def version, do: @version
|
||||||
iex> ProxmoxAgent.hello()
|
|
||||||
:world
|
|
||||||
|
|
||||||
"""
|
|
||||||
def hello do
|
|
||||||
:world
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
defmodule ProxmoxAgentTest do
|
defmodule ProxmoxAgentTest do
|
||||||
use ExUnit.Case
|
use ExUnit.Case, async: true
|
||||||
doctest ProxmoxAgent
|
|
||||||
|
|
||||||
test "greets the world" do
|
test "version/0 returns a non-empty string" do
|
||||||
assert ProxmoxAgent.hello() == :world
|
assert is_binary(ProxmoxAgent.version())
|
||||||
|
assert ProxmoxAgent.version() != ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue