-
Notifications
You must be signed in to change notification settings - Fork 8
/
mix.exs
66 lines (58 loc) · 1.52 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
defmodule OPQ.Mixfile do
use Mix.Project
@source_url "https://github.com/fredwu/opq"
@version "4.0.4"
def project do
[
app: :opq,
version: @version,
elixir: "~> 1.13",
elixirc_paths: elixirc_paths(Mix.env()),
package: package(),
name: "OPQ: One Pooled Queue",
description: "A simple, in-memory queue with worker pooling and rate limiting in Elixir.",
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [coveralls: :test],
aliases: [publish: ["hex.publish", &git_tag/1]]
]
end
def application do
[
extra_applications: [:logger]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
{:gen_stage, "~> 1.1"},
{:recode, "~> 0.6", only: :dev},
{:ex_doc, ">= 0.0.0", only: :dev},
{:excoveralls, "~> 0.14", only: :test}
]
end
defp package do
[
maintainers: ["Fred Wu"],
licenses: ["MIT"],
links: %{"GitHub" => @source_url}
]
end
defp git_tag(_args) do
System.cmd("git", ["tag", "v" <> Mix.Project.config()[:version]])
System.cmd("git", ["push"])
System.cmd("git", ["push", "--tags"])
end
defp docs do
[
extras: ["CHANGELOG.md": [title: "Changelog"], "README.md": [title: "Overview"]],
main: "readme",
source_url: @source_url,
source_ref: "v#{@version}",
formatters: ["html"]
]
end
end