Versioce.Config (Versioce v2.0.0) View Source

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

Link to this section Summary

Functions

Get config value for calver_format

Get config value for files

Get config value for global

Get config value for post_hooks

Get config value for pre_hooks

Link to this section Functions

Get config value for calver_format

What format to use for version when using CalVer. It should be still 3 values separated by a dot semver style.

Available parts are: YYYY - Full year - 2006, 2016, 2106 MM - Short month - 1, 2 ... 11, 12 0M - Zero-padded month - 01, 02 ... 11, 12 DD - Short day - 1, 2 ... 30, 31 0D - Zero-padded day - 01, 02 ... 30, 31

You can configure it with:

config :versioce,
  calver_format: "YYYY.0M.0D"

Value for this configuration should either be a literal value or a function of 0 arity, that will return the value, ex:

config :versioce,
  calver_format: fn -> "YYYY.0M.0D" end

Get config value for files

Files to be updated with new version. File paths should be relative to your mix.exs

You can configure it with:

config :versioce,
  files: ["README.md"]

Value for this configuration should either be a literal value or a function of 0 arity, that will return the value, ex:

config :versioce,
  files: fn -> ["README.md"] end

Get config value for global

Whether the update will be global in file. By default versioce will update only the first version in file it finds

You can configure it with:

config :versioce,
  global: false

Value for this configuration should either be a literal value or a function of 0 arity, that will return the value, ex:

config :versioce,
  global: fn -> false end

Get config value for post_hooks

Hooks to run after the version bumping

You can configure it with:

config :versioce,
  post_hooks: []

Value for this configuration should either be a literal value or a function of 0 arity, that will return the value, ex:

config :versioce,
  post_hooks: fn -> [] end

Get config value for pre_hooks

Hooks to run before the version bumping

You can configure it with:

config :versioce,
  pre_hooks: []

Value for this configuration should either be a literal value or a function of 0 arity, that will return the value, ex:

config :versioce,
  pre_hooks: fn -> [] end