Versioce.PreHook behaviour (Versioce v0.1.1) View Source

Behaviour for pre hooks in versioce.

A hook can be defined by simply using Versioce.PreHook in a module:

defmodule MyProj.Versioce.PreHook do
  use Versioce.PreHook

  def run(args) do
    IO.inspect(args)
  end
end

The run/1 function will receive all arguments passed to the bump mix task. It can modify them and make required side-effects but it should return them as result of one hook is piped into next one.

Link to this section Summary

Callbacks

A hook needs to implement run which receives a list of command line args for bump task. It should return them as well.

Link to this section Callbacks

Specs

run([String.t()]) :: [String.t()]

A hook needs to implement run which receives a list of command line args for bump task. It should return them as well.