forked from annkissam/rummage_phoenix
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mix.exs
109 lines (96 loc) · 2.32 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
108
109
defmodule Rummage.Phoenix.Mixfile do
use Mix.Project
@version "2.0.0"
@url "https://github.com/annkissam/rummage_phoenix"
def project do
[
app: :rummage_phoenix,
version: @version,
elixir: "~> 1.10",
deps: deps(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
# Test
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [coveralls: :test],
aliases: aliases(),
elixirc_paths: elixirc_paths(Mix.env()),
# Hex
description: description(),
package: package(),
# Docs
name: "Rumamge.Phoenix",
docs: docs()
]
end
def application do
[
applications: [
:logger,
:phoenix_html,
:phoenix,
:rummage_ecto
]
]
end
def package do
[
files: ["lib", "mix.exs", "README.md"],
maintainers: ["Adi Iyengar"],
licenses: ["MIT"],
links: %{"Github" => @url}
]
end
defp deps do
[
{:phoenix, "~> 1.4.0 or ~> 1.5.0"},
{:phoenix_html, "~> 2.14"},
{:rummage_ecto, git: "https://github.com/acolin/rummage_ecto.git"},
{:jason, "~> 1.2", only: [:dev, :test]},
{:credo, "~> 0.5", only: [:dev, :test]},
{:ex_doc, "~> 0.14", only: :dev, runtime: false},
{:excoveralls, "~> 0.3", only: :test},
{:inch_ex, "~> 0.5", only: [:dev, :test, :docs]},
{:postgrex, ">= 0.0.0", only: [:test]}
]
end
defp description do
"""
A full support library for phoenix that allows us to search, sort and
paginate phoenix ecto models.
"""
end
def docs do
[
main: "Rummage.Phoenix",
source_url: @url,
extras: ["doc_readme.md", "CHANGELOG.md"],
source_ref: "v#{@version}"
]
end
defp aliases do
[
"ecto.setup": [
"ecto.create",
"ecto.migrate"
],
"ecto.reset": [
"ecto.drop",
"ecto.setup"
],
test: [
# "ecto.drop",
"ecto.create --quiet",
"ecto.migrate",
"test"
],
publish: ["hex.publish", &git_tag/1]
]
end
defp git_tag(_args) do
System.cmd("git", ["tag", Mix.Project.config()[:version]])
System.cmd("git", ["push", "--tags"])
end
defp elixirc_paths(:test), do: ["lib", "priv", "test/support"]
defp elixirc_paths(_), do: ["lib"]
end