-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
105 lines (95 loc) · 2.44 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
defmodule Torus.MixProject do
use Mix.Project
@version "0.2.2"
@source_url "https://github.com/dimamik/torus"
def project do
[
app: :torus,
version: @version,
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
preferred_cli_env: [
"ecto.migrate": :test,
"ecto.reset": :test,
"ecto.rollback": :test,
"ecto.gen": :test,
"test.ci": :test,
"test.reset": :test,
"test.setup": :test
],
# Hex
package: package(),
description: """
Torus bridges Ecto and PostgreSQL, simplifying building search queries.
""",
# Docs
name: "Torus",
docs: [
main: "Torus",
api_reference: false,
source_ref: "v#{@version}",
source_url: @source_url,
extra_section: "GUIDES",
formatters: ["html"],
extras: extras(),
skip_undefined_reference_warnings_on: ["CHANGELOG.md"]
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_env), do: ["lib"]
defp deps do
[
{:ecto, "~> 3.0"},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:ecto_sql, ">= 0.0.0", only: [:test, :dev], runtime: false},
{:postgrex, ">= 0.0.0", only: :test},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false}
]
end
defp package do
[
maintainers: ["Dima Mikielewicz"],
licenses: ["MIT"],
links: %{
Website: "https://dimamik.com",
Changelog: "#{@source_url}/blob/main/CHANGELOG.md",
GitHub: @source_url
},
files: ~w(lib .formatter.exs mix.exs README* CHANGELOG* LICENSE*)
]
end
defp aliases do
[
release: [
"cmd git tag v#{@version}",
"cmd git push",
"cmd git push --tags",
"hex.publish --yes"
],
"test.reset": ["ecto.drop --quiet", "test.setup"],
"test.setup": ["ecto.create --quiet", "ecto.migrate --quiet"],
"test.ci": [
"format --check-formatted",
"deps.unlock --check-unused",
"credo --strict",
"test --raise"
]
]
end
defp extras do
[
# TODO Add more guides
"CHANGELOG.md": [title: "Changelog"]
]
end
end