-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmix.exs
82 lines (73 loc) · 2.07 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
defmodule PayDayLoan.Mixfile do
use Mix.Project
def project do
[
app: :pay_day_loan,
version: version(),
description: description(),
package: package(),
elixir: "~> 1.12",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
dialyzer: [
plt_add_apps: [],
ignore_warnings: ".dialyzer_ignore",
flags: [:error_handling]
],
elixirc_paths: elixirc_paths(Mix.env()),
docs: [main: "PayDayLoan"],
deps: deps()
]
end
# Auto version stamp, a la CoMix.
defp version do
case :file.consult("hex_metadata.config") do
# Use version from hex_metadata when we're a package
{:ok, data} ->
{"version", version} = List.keyfind(data, "version", 0)
version
# Otherwise, use git version
_ ->
case System.cmd("git", ["describe", "--tags"]) do
{"v" <> version, 0} ->
String.trim(version)
{tag_or_err, code} ->
Mix.raise("Failed to get version from `git describe --tags`. Code #{code}: #{inspect(tag_or_err)}")
end
end
end
def application do
[applications: [:logger]]
end
defp description do
"""
Framework for building on-demand caching. Fast cache now!
"""
end
defp package do
[
files: ["lib", "LICENSE.txt", "mix.exs", "mix.lock", "README.md"],
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/simplifi/pay_day_loan"},
maintainers: ["Simpli.fi Development Team"]
]
end
defp elixirc_paths(:test), do: ["lib", "test"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
{:patiently, "~> 0.2", only: :test},
{:ex_doc, "~> 0.28", only: :dev},
{:dialyxir, "~> 1.2", only: :dev, runtime: false},
{:excoveralls, "~> 0.14", only: :test},
{:credo, "~> 1.6", only: [:dev]}
]
end
end