-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmix.exs
61 lines (56 loc) · 1.61 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
defmodule FortniteApi.Mixfile do
use Mix.Project
def project do
[
app: :fortnite_api,
version: auto_version(),
elixir: "~> 1.7",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
lockfile: "../../mix.lock",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: Mix.compilers(),
start_permanent: Mix.env() == :prod,
build_embedded: Mix.env() == :prod,
deps: deps(),
test_coverage: [tool: ExCoveralls]
]
end
def auto_version() do
{rev, _} = System.cmd("git", ["rev-parse", "--short", "HEAD"], stderr_to_stdout: true)
# HACK this is necessary for the command to result
# in valid SemVer versions even during pre_commit hooks.
if String.starts_with?(rev, "fatal") do
"1.0.0"
else
"1.0.0+#{String.trim_trailing(rev)}"
end
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[
mod: {FortniteApi.Application, []},
extra_applications: [:logger, :runtime_tools, :httpoison]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
{:poison, "~> 3.1"},
{:httpoison, "~> 0.13"},
{:hackney, ">= 1.15.2", override: true},
{:ok, "~> 1.9"},
{:conform, "~> 2.2"},
{:mock, "~> 0.3.0", only: :test},
{:timex, "~> 3.1"}
]
end
end