-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
91 lines (83 loc) · 2.14 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
defmodule Ecto.Adapters.Druid.MixProject do
use Mix.Project
@version "0.5.0"
@source_url "https://github.com/wistia/ecto_druid"
def project do
[
app: :ecto_druid,
description: "Ecto adapter for Druid",
version: @version,
elixir: "~> 1.16",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
package: package(),
deps: deps(),
docs: docs(),
aliases: [publish: ["hex.publish", &git_tag/1]]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
defp elixirc_paths(:test), do: ["test/support", "lib"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:ecto_sql, "~> 3.7"},
{:req, "~> 0.5.8"},
{:jason, "~> 1.0"},
{:plug, "~> 1.15", only: :test},
{:ex_doc, "~> 0.31", only: :dev, runtime: false}
]
end
defp package do
[
maintainers: ["Allen Madsen", "Garrett Schroath", "Konstantin Minevskiy", "Wistia"],
licenses: ["Apache-2.0"],
links: %{
"GitHub" => @source_url,
"Documentation" => "https://hexdocs.pm/ecto_druid"
}
]
end
defp docs do
[
main: "Ecto.Adapters.Druid",
source_ref: "v#{@version}",
canonical: "http://hexdocs.pm/ecto_druid",
source_url: @source_url,
groups_for_modules: [
Querying: [
Ecto.Druid.Query
],
"Druid Ecto Types": [
Ecto.Druid.DateTime,
Ecto.Druid.DSHistogram,
Ecto.Druid.HLLSketch,
Ecto.Druid.QuantilesSketch,
Ecto.Druid.ThetaSketch,
Ecto.Druid.TupleSketch
],
"Druid Client": [
Druid.Client,
Druid.Client.SQL,
Druid.Client.Native,
Druid.Client.Task
],
Utilities: [
Ecto.Druid.ComplexType,
Ecto.Druid.Util
]
]
]
end
defp git_tag(_args) do
tag = "v" <> Mix.Project.config()[:version]
System.cmd("git", ["tag", tag])
System.cmd("git", ["push", "origin", tag])
end
end