-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
105 lines (94 loc) · 2.41 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 GasolinePrice.MixProject do
use Mix.Project
@source_url "https://github.com/mithereal/ex_gasoline_price.git"
@version "0.3.1"
@app :gasoline_price
def project do
[
app: @app,
version: @version,
build_path: "./_build",
config_path: "./config/config.exs",
deps_path: "./deps",
lockfile: "./mix.lock",
elixir: "~> 1.9",
name: "gasoline_price",
source_url: @source_url,
start_permanent: Mix.env() == :prod || Mix.env() == :cli,
deps: deps(),
docs: docs(),
aliases: aliases(),
description: description(),
package: package(),
elixirc_paths: elixirc_paths(Mix.env()),
releases: [{@app, release()}],
preferred_cli_env: [release: :cli]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help compile.app" to learn about applications.
def application do
case Mix.env() == :cli do
true ->
[
extra_applications: [:logger],
mod: {GasolinePrice.Cli, []}
]
false ->
[
extra_applications: [:logger]
]
end
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# {:dep_from_hexpm, "~> 0.3.0"},
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"},
{:floki, "~> 0.31.0"},
{:tesla, "~> 1.4"},
{:jason, "~> 1.2"},
{:hackney, "~> 1.17"},
{:ex_doc, "~> 0.14", only: :dev},
{:inch_ex, ">= 0.0.0", only: :docs},
{:bakeware, runtime: false, only: :cli}
]
end
defp description() do
"Fetch Gasoline Rates from gasprices.aaa.com."
end
defp package() do
[
name: "gasoline_price",
files: ["lib", "mix.exs", "README*"],
maintainers: ["Jason Clark"],
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/mithereal/ex_gasoline_price"}
]
end
defp aliases do
[
test: ["test"]
]
end
defp docs() do
[
main: "readme",
name: "Gasoline Price",
source_ref: "v#{@version}",
canonical: "http://hexdocs.pm/gasoline_price",
source_url: @source_url,
extras: ["README.md"]
]
end
defp release do
[
overwrite: true,
cookie: "#{@app}_cookie",
quiet: true,
steps: [:assemble, &Bakeware.assemble/1],
strip_beams: Mix.env() == :cli
]
end
end