11# Available Hooks
22
33## Pre Hooks
4+
45### ` Versioce.PreHooks.Inspect `
6+
57This is a simple hook that will inspect its argument. Meant for debugging purposes\
68You can add it to your pre_hooks in the config.
79``` elixir
@@ -16,10 +18,12 @@ Running pre-hooks: [Versioce.PreHooks.Inspect]
1618Bumping version from 0.1.0:
17190.1.1
1820Running post-hooks: []
19- Done.
2021```
22+
2123## Post Hooks
24+
2225### ` Versioce.PostHooks.Inspect `
26+
2327This is a simple hook that will inspect its argument. Meant for debugging purposes\
2428You can add it to your post_hooks in the config.
2529``` elixir
@@ -34,9 +38,10 @@ Bumping version from 0.1.0:
34380.1.1
3539Running post-hooks: [Versioce.PostHooks.Inspect]
3640["0.1.1"]
37- Done.
3841```
42+
3943### ` Versioce.PostHooks.Git.Add `
44+
4045Performs a ` git add ` operation in your repository
4146You can add it to your post_hooks in the config.
4247``` elixir
@@ -50,15 +55,19 @@ You can enable dirty add in configuration:
5055config :versioce , :git ,
5156 dirty_add: true
5257```
58+
5359### ` Versioce.PostHooks.Git.Commit `
60+
5461Performs a ` git commit -m ` operation in the repository.
5562You can configure the commit message template in your config
5663``` elixir
5764config :versioce , :git ,
5865 commit_message_template: " Bump version to {version}"
5966```
6067` {version} ` here will be replaced with the new version
68+
6169### ` Versioce.PostHooks.Git.Tag `
70+
6271Performs a ` git tag -a -m ` operation in the repository.
6372You can configure the tag template and message template in your config
6473``` elixir
@@ -67,15 +76,19 @@ config :versioce, :git,
6776 tag_message_template: " Release v{version}"
6877```
6978` {version} ` here will be replaced with the new version
79+
7080### ` Versioce.PostHooks.Git.Release `
81+
7182Creates a git release. It is an alias for ` [Versioce.PostHooks.Git.Add, Versioce.PostHooks.Git.Commit, Versioce.PostHooks.Git.Tag] ` \
7283You can configure the messages
7384You can add it to your post_hooks in the config.
7485``` elixir
7586config :versioce ,
7687 post_hooks: [Versioce .PostHooks .Git .Release ],
7788```
89+
7890### ` Versioce.PostHooks.Changelog `
91+
7992Generates a changelog file at ` Versioce.Config.Changelog.changelog_file/0 ` .\
8093There is a lot of configuration for the changelog generation, see ` Versioce.Config.Changelog ` for all the options.
8194
0 commit comments