-
Notifications
You must be signed in to change notification settings - Fork 3
/
mix.exs
74 lines (65 loc) · 1.99 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
defmodule RedixPubsubFastlane.Mixfile do
use Mix.Project
@project_url "https://github.com/cnsa/redix_pubsub_fastlane"
@version "0.3.4"
def project do
[app: :redix_pubsub_fastlane,
version: @version,
elixir: "~> 1.3",
elixirc_paths: elixirc_paths(Mix.env),
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps(),
aliases: [publish: ["hex.publish", "hex.publish docs", &git_tag/1], tag: [&git_tag/1]],
source_url: @project_url,
homepage_url: @project_url,
description: "Fastlane pattern based on Redix.PubSub interface for Elixir",
package: package(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: cli_env_for(:test, [
"coveralls", "coveralls.detail", "coveralls.html", "coveralls.post",
]),
docs: docs()]
end
def application do
[applications: [:logger, :poolboy, :redix_pubsub]]
end
defp elixirc_paths(:test), do: elixirc_paths() ++ ["test/support"]
defp elixirc_paths(_), do: elixirc_paths()
defp elixirc_paths, do: ["lib"]
defp deps do
[
{:redix_pubsub, "~> 0.4.0"},
{:poolboy, "~> 1.5.1 or ~> 1.6"},
{:poison, "~> 2.0 or ~> 3.0", only: :test},
{:ex_doc, "~> 0.11", only: :dev, runtime: false},
{:earmark, ">= 0.0.0", only: :dev},
{:ex_spec, "~> 2.0.0", only: :test},
{:excoveralls, "~> 0.5", only: :test},
]
end
defp cli_env_for(env, tasks) do
Enum.reduce(tasks, [], fn(key, acc) -> Keyword.put(acc, :"#{key}", env) end)
end
defp package do
[
name: :redix_pubsub_fastlane,
maintainers: ["Alexander Merkulov"],
licenses: ["MIT"],
links: %{
"GitHub" => @project_url
}
]
end
defp git_tag(_args) do
System.cmd "git", ["tag", "v" <> Mix.Project.config[:version]]
System.cmd "git", ["push", "--tags"]
end
defp docs do
[
main: "Redix.PubSub.Fastlane",
source_ref: "v#{@version}",
source_url: @project_url
]
end
end