-
Notifications
You must be signed in to change notification settings - Fork 10
/
mix.exs
107 lines (96 loc) · 2.52 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
defmodule ApathyDrive.Mixfile do
use Mix.Project
def project do
[
app: :apathy_drive,
version: version(),
elixir: "~> 1.12.0",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix] ++ Mix.compilers(),
deps: deps(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
releases: releases()
]
end
# Configuration for the OTP application
def application do
[
mod: {ApathyDrive, []},
extra_applications: extra_applications()
]
end
defp releases() do
[
apathy_drive: [
steps: [:assemble, &make_tarball/1],
config_providers: [
{Toml.Provider,
[
path: {:system, "RELEASE_CONFIG_DIR", "apathy_drive.toml"},
transforms: []
]}
]
]
]
end
defp make_tarball(release) do
File.cd("/usr/src/app/_build/prod/rel/apathy_drive")
System.cmd("tar", [
"czf",
"/usr/src/app/_build/prod/rel/apathy_drive/apathy_drive.tar.gz",
"."
])
release
end
defp extra_applications() do
extra_apps = [:logger, :runtime_tools]
if Application.get_env(:logger, :handle_sasl_reports) do
[:sasl | extra_apps]
else
extra_apps
end
end
defp deps do
[
{:bamboo, "~> 2.2.0"},
{:jason, "~> 1.2.0"},
{:postgrex, "~> 0.15.9"},
{:phoenix, "~> 1.5.9"},
{:phoenix_pubsub, "~> 2.0"},
{:phoenix_live_reload, "~> 1.3.1", only: :dev},
{:fs, "~> 6.12.0"},
{:phoenix_live_view, "~> 0.15.7"},
{:ecto_sql, "~> 3.6.1"},
{:phoenix_ecto, "~> 4.2.1"},
{:plug_cowboy, "~> 2.5.0"},
{:plug, "~> 1.11.1"},
{:scrivener_ecto, "~> 2.7.0"},
{:inflex, "~> 2.1.0"},
{:comeonin, "~> 5.3.2"},
{:bcrypt_elixir, "~> 2.0"},
{:statix, "~> 1.4.0"},
{:rollbax, "~> 0.11.0"},
{:gossip, "~> 1.4.0"},
{:distillery, "~> 2.0.12"},
{:toml,
github: "adamkittelson/toml-elixir", ref: "4c0b24a2b409f6bdec78876c1324eea16f74a093"},
{:ordinal, "~> 0.2.0"},
{:dnsimple, "~> 3.0.0"},
{:tzdata, "~> 1.1.0"},
{:timex, "~> 3.7.5"},
{:logflare_logger_backend, "~> 0.8.0"},
{:floki, ">= 0.0.0", only: :test},
# for tzdata
{:hackney, "~> 1.0"}
]
end
defp version do
~r/[0-9]+/
|> Regex.scan(File.read!("VERSION.yml"))
|> List.flatten()
|> Enum.join(".")
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
end