Skip to content

Commit 161ce75

Browse files
committed
Update project details
1 parent 9a4dce1 commit 161ce75

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

mix.exs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ defmodule BankingStandards.MixProject do
44
def project do
55
[
66
app: :banking_standards,
7-
version: "0.1.0",
7+
version: app_version(),
88
elixir: "~> 1.14",
99
start_permanent: Mix.env() == :prod,
1010
description: description(),
@@ -28,9 +28,7 @@ defmodule BankingStandards.MixProject do
2828
end
2929

3030
defp description do
31-
"""
32-
Banking Standards
33-
"""
31+
"Building the foundation for seamless financial transactions in Elixir."
3432
end
3533

3634
defp package do
@@ -43,4 +41,14 @@ defmodule BankingStandards.MixProject do
4341
}
4442
]
4543
end
44+
45+
defp app_version do
46+
# get git version
47+
{description, 0} = System.cmd("git", ~w[describe]) # => returns something like: v1.0-231-g1c7ef8b
48+
_git_version = String.trim(description)
49+
|> String.split("-")
50+
|> Enum.take(2)
51+
|> Enum.join(".")
52+
|> String.replace_leading("v", "")
53+
end
4654
end

0 commit comments

Comments
 (0)