forked from MyMedsAndMe/marco_polo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
68 lines (54 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
62
63
64
65
66
67
68
defmodule MarcoPolo.Mixfile do
use Mix.Project
@client_name "MarcoPolo (Elixir driver)"
@version "0.2.1"
def project do
[app: :marco_polo,
version: @version,
elixir: "~> 1.6",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
# Testing
aliases: ["test.all": &test_all/1],
preferred_cli_env: ["test.all": :test],
test_coverage: [tool: Coverex.Task],
# Hex
package: package,
description: description,
# Docs
name: "MarcoPolo",
source_url: "https://github.com/MyMedsAndMe/marco_polo",
deps: deps]
end
def application do
[applications: [:logger, :connection] ++ if(Mix.env == :test, do: [:dotenv], else: []),
env: [client_name: @client_name, version: @version]]
end
defp package do
[maintainers: ["Andrea Leopardi"],
licenses: ["Apache"],
links: %{"GitHub" => "https://github.com/MyMedsAndMe/marco_polo"}]
end
defp description do
"""
Binary driver for the OrientDB database.
"""
end
defp deps do
[{:decimal, "~> 1.1.0"},
{:connection, "~> 1.0.0"},
{:dialyze, "~> 0.2.0", only: :dev},
{:coverex, "~> 1.4", only: :test},
{:dotenv, "~> 3.0", only: :test},
{:ex_doc, "~> 0.9", only: :docs}]
end
defp test_all(args) do
args = if IO.ANSI.enabled?, do: ["--color"|args], else: ["--no-color"|args]
args = ~w(--include scripting) ++ args
vsn = System.get_env("ORIENTDB_VERSION")
if is_nil(vsn) or Version.compare(vsn, "2.1.0") in [:eq, :gt] do
args = ~w(--include live_query) ++ args
end
Mix.Task.run "test", args
end
end