From 5df2109a3c0e4545e46707ef15e013ce49292bbf Mon Sep 17 00:00:00 2001 From: href Date: Sun, 11 Dec 2022 12:51:27 +0000 Subject: chore: git url, extend version number and improve reporting - appends `.build%y%m%d@%H%M` to version - more info & runtime version in `!version` - `LSG.source_url()` to get the git url instead of hardcodes --- lib/lsg_irc/base_plugin.ex | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib/lsg_irc/base_plugin.ex') diff --git a/lib/lsg_irc/base_plugin.ex b/lib/lsg_irc/base_plugin.ex index a95f45c..d5da532 100644 --- a/lib/lsg_irc/base_plugin.ex +++ b/lib/lsg_irc/base_plugin.ex @@ -96,8 +96,15 @@ defmodule LSG.IRC.BasePlugin do {:ok, vsn} = :application.get_key(:lsg, :vsn) ver = List.to_string(vsn) url = LSGWeb.Router.Helpers.irc_url(LSGWeb.Endpoint, :index) - version = "v#{ver} ; #{url} ; source: https://git.yt/115ans/sys" - message.replyfun.(version) + elixir_ver = Application.started_applications() |> List.keyfind(:elixir, 0) |> elem(2) |> to_string() + otp_ver = :erlang.system_info(:system_version) |> to_string() |> String.trim() + system = :erlang.system_info(:system_architecture) |> to_string() + message.replyfun.([ + <<"🤖 I am a robot running", 2, "beautte, version #{ver}", 2, " — source: #{LSG.source_url()}, + "🦾 Elixir #{elixir_ver} #{otp_ver} on #{system}" + "👷‍♀️ Owner: href ", + "🌍 Web interface: #{url}" + ]) {:noreply, nil} end -- cgit v1.2.3