forked from skwerlman/basilisk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
133 lines (121 loc) · 2.77 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
defmodule Basilisk.MixProject do
@moduledoc false
use Mix.Project
@version "0.1.0"
@repo "https://github.com/skwerlman/basilisk"
def project do
[
app: :basilisk,
version: @version,
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
preferred_cli_env: [test: :test],
aliases: aliases(),
deps: deps(),
docs: docs(),
dialyzer: dialyzer(),
package: package()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger, :protobuf],
mod: {Basilisk.Application, []},
start_phases: [
init: [],
# sync: [],
ready: []
]
]
end
defp aliases do
[
setup: [
"cmd ./tasks/setup_hooks.sh",
"escript.install github skwerlman/protobuf-elixir branch no_underscores",
"cmd ./tasks/setup_protoc.sh",
"deps.get",
"deps.compile",
"compile",
"ecto.create",
"ecto.migrate"
],
hipe: ["protoc", "cmd ./tasks/hipe.sh"],
protoc: "cmd ./tasks/protoc.sh",
compile: ["protoc", "compile"]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:argon2_elixir, "~> 2.4"},
{:comeonin, "~> 5.3"},
{:ecto_sql, "~> 3.5"},
{:ecto, "~> 3.5"},
{:flex_logger, "~> 0.2"},
{:logger_file_backend, "~> 0.0"},
{:protobuf, git: "https://github.com/skwerlman/protobuf-elixir", branch: "no_underscores"},
{:postgrex, "~> 0.15"},
{:ranch, "~> 2.0"},
{:jason, "~> 1.2"},
#####
{:credo, "~> 1.5", runtime: false, only: [:dev, :test]},
{:dialyxir, "~> 1.0", runtime: false, only: [:dev, :test]},
{:ex_doc, "~> 0.23", runtime: false, only: :dev}
]
end
defp docs do
[
main: "readme",
# source_ref: "v#{@version}",
source_url: @repo,
extras: [
"README.md": [title: "README"]
]
]
end
defp dialyzer do
plt =
case Mix.env() do
# this fixes a failure when dialyxir is run in a test env
:test ->
[:ex_unit]
_ ->
[]
end
[
plt_add_apps: plt,
flags: [
:unmatched_returns,
:error_handling,
:race_conditions,
:no_opaque,
:underspecs
]
]
end
defp package do
[
maintainers: ["skwerlman"],
licenses: ["GPLv3"],
files: files(),
links: links()
]
end
defp files do
[
"lib",
"mix.exs",
"LICENSE",
"README.md"
]
end
defp links do
%{
"Github" => @repo,
"Basilisk Wiki" => "https://github.com/skwerlman/basilisk/wiki",
"Cockatrice Wiki" => "https://github.com/cockatrice/cockatrice/wiki"
}
end
end