forked from dmkenney/xamal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
99 lines (89 loc) · 2.56 KB
/
Copy pathmix.exs
File metadata and controls
99 lines (89 loc) · 2.56 KB
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
defmodule Xamal.MixProject do
use Mix.Project
@version "0.4.1"
@source_url "https://github.com/elixir-vibe/xamal"
def project do
[
app: :xamal,
version: @version,
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
aliases: aliases(),
description: description(),
package: package(),
source_url: @source_url,
docs: docs(),
dialyzer: [
plt_file: {:no_warn, "_build/dev/dialyxir_plt.plt"},
plt_add_apps: [:ex_unit, :mix]
]
]
end
defp description do
"Mix-first deployment tool for bare-metal Elixir releases over SSH. " <>
"An Elixir port of Kamal using native releases, Caddy, and Elixir configuration."
end
defp package do
[
licenses: ["MIT"],
links: %{
"GitHub" => @source_url,
"Changelog" => "#{@source_url}/blob/master/CHANGELOG.md"
},
files: ~w(lib examples .formatter.exs mix.exs README.md LICENSE CHANGELOG.md UPGRADING.md)
]
end
defp docs do
[
main: "readme",
source_ref: "v#{@version}",
extras: ["README.md", "UPGRADING.md", "CHANGELOG.md", "LICENSE"],
groups_for_modules: [
"Mix Tasks": [~r/Mix\.Tasks\.Xamal/]
]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
def application do
[
extra_applications: [:logger, :ssh, :inets],
mod: {Xamal.Application, []}
]
end
def cli do
[preferred_envs: [ci: :test, "ci.lint": :test, "ci.test": :test]]
end
defp deps do
[
{:igniter, "~> 0.6"},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:ex_slop, "~> 0.4", only: [:dev, :test], runtime: false},
{:ex_dna, "~> 1.5", only: [:dev, :test], runtime: false},
{:reach, "~> 2.4", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.34", only: :dev, runtime: false}
]
end
defp aliases do
[
# Version-independent style and type checks. Run once in CI on the latest
# Elixir; running them per-version adds cost without extra signal.
"ci.lint": [
"format --check-formatted",
"credo --strict",
"ex_dna",
"reach.check --arch --smells",
"dialyzer"
],
# Version-dependent checks. Run across the full Elixir matrix in CI.
"ci.test": [
"compile --warnings-as-errors",
"test"
],
ci: ["ci.lint", "ci.test"]
]
end
end