Improve Terms of Service

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-06-19 19:27:10 +02:00
parent 9cc5cb72b5
commit f5241954bd
56 changed files with 10908 additions and 3348 deletions

21
lib/service/git_status.ex Normal file
View File

@@ -0,0 +1,21 @@
defmodule Mobilizon.Service.GitStatus do
@moduledoc """
See https://github.com/CrowdHailer/git_status/
"""
require Logger
@commit (case System.cmd("git", ["describe", "--tags", "--dirty"]) do
{hash, 0} ->
String.trim(hash)
_ ->
Logger.warn("Could not read git commit hash")
"UNKNOWN"
end)
@doc """
The git commit hash read at compile time, if present
"""
@spec commit :: String.t()
def commit, do: @commit
end