/
config.ex
56 lines (45 loc) · 1.57 KB
/
config.ex
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
defmodule Versioce.Config do
@moduledoc """
Configuration module for versioce app. Picks either a value from config.ex
or a default.
All config values take either a direct value or a function of arity 0 that will
return the value.
Other config namespaces:
`Versioce.Config.Git`
"""
import Versioce.Config.Macros, only: :macros
value(:files, ["README.md"], "Files to be updated with new version")
value(
:global,
false,
"Whether the update will be global in file.\nBy default versioce will update only the first version in file it finds"
)
value(:pre_hooks, [], "Hooks to run before the version bumping")
value(:post_hooks, [], "Hooks to run after the version bumping")
defmodule Git do
@moduledoc """
Configuration module for versioce git integration.
see `Versioce.Config` for more details
"""
value(
[:git, :dirty_add],
false,
"Whether to add all the files in `git add` or only from `Versioce.Config.files`. By default only `Versioce.Config.files`"
)
value(
[:git, :commit_message_template],
"Bump version to {version}",
"Template for the commit message. `{version}` will be replaced with the version you bumped to"
)
value(
[:git, :tag_template],
"{version}",
"Template for the tag annotation. `{version}` will be replaced with the version you bumped to"
)
value(
[:git, :tag_message_template],
"Release version to {version}",
"Template for the tag message. `{version}` will be replaced with the version you bumped to"
)
end
end