-
Notifications
You must be signed in to change notification settings - Fork 3
/
mix.exs
127 lines (112 loc) · 2.62 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
defmodule SecretVault.MixProject do
use Mix.Project
@version "1.2.2"
@source "https://github.com/SecretVault-elixir/secret_vault"
def project do
[
app: :secret_vault,
name: "SecretVault",
version: @version,
elixir: "~> 1.11",
start_permanent: Mix.env() == :prod,
deps: deps(),
description: description(),
package: package(),
source_url: @source,
homepage_url: @source,
docs: docs(),
dialyzer: dialyzer()
]
end
defp description do
"All-included solution for managing secrets in mix projects"
end
defp package do
[
description: description(),
licenses: [~S|BSD 2-Clause "Simplified" License|],
files: [
"lib",
"mix.exs",
"README.md",
".formatter.exs"
],
maintainers: [
"hissssst",
"yunmikun2"
],
links: %{
GitHub: @source,
Changelog: "#{@source}/blob/main/CHANGELOG.md"
}
]
end
defp docs do
[
source_ref: "v#{@version}",
main: "readme",
# TODO
# extra_section: "GUIDES",
extra_section: "GUIDES",
extras: ["README.md" | Path.wildcard("guides/*/*")] ++ ["CHANGELOG.md"],
groups_for_modules: groups_for_modules(),
groups_for_extras: groups_for_extras()
]
end
def application do
[
extra_applications: [:logger, :crypto]
]
end
defp deps do
[
# Testing mix tasks
{:mix_tester, "~> 1.0", only: :test},
# Type checking
{:dialyxir, "~> 1.0", only: :dev, runtime: false},
{:gradient, github: "esl/gradient", only: :dev, runtime: false},
# Linting
{:mix_unused, "~> 0.4", only: :dev, runtime: false},
{:credo, "~> 1.6", only: :dev, runtime: false},
# Documentation
{:ex_doc, "~> 0.28", only: :dev, runtime: false},
# PBKDF
{:pbkdf2_key_derivation, "~> 2.0", optional: true}
]
end
defp dialyzer do
[
plt_add_apps: [:mix]
]
end
defp groups_for_extras do
[
Tutorials: ~r/guides\/tutorials\/.*/
]
end
defp groups_for_modules do
[
Runtime: [
SecretVault,
SecretVault.Config,
SecretVault.Storage
],
Development: [
Mix.Tasks.Scr.Create,
Mix.Tasks.Scr.Edit,
Mix.Tasks.Scr.Show,
Mix.Tasks.Scr.Audit,
Mix.Tasks.Scr.Insert
],
Ciphers: [
SecretVault.Cipher,
SecretVault.Cipher.ErlangCrypto,
SecretVault.Cipher.Plaintext
],
"Key Derivation": [
SecretVault.KeyDerivation,
SecretVault.KDFs.PBKDF2
]
]
end
end