Home

Awesome

Changex

Mix tasks for parsing git log.

Build Status

Usage

Add Changex as a dependency in your mix.exs file.

def deps do
  [ { :changex } ]
end

After you are done, run mix deps.get to fetch and compile Changex. You will now have access to the changex mix tasks in your project.

Mix Tasks

Changex.Diff

If you run mix changex.diff then a diff based on your git commit history will be generated. This can be called in several way:

To generate a changelog from the most recent tag (the root commit will be used if there are no tags) to the git HEAD run:

mix changex.diff

To generate a changelog from a git reference (commit, tag, etc.) to HEAD run:

mix changex.diff a87a32f
mix changex.diff v0.1.0
mix changex.diff HEAD~5

To generate a changelog between two commit references:

mix changex.diff a87a32f v0.1.0
mix changex.diff v0.1.0 v0.1.1
mix changex.diff HEAD~5 HEAD~2

The following options are also available:

Option          Description
----------      ------
--dir           Run changex.diff using a directory other than the current one
--format        Change the output format. One of terminal, markdown or elixir
--github        Include link to commit on GitHub when outputting the hash of
                the commit. Should be in the format `/user/repo`

Changex.Update

If you run mix changex.update then the changelog file in the repository will be updated. This will use the most recent tag if available, if not then it will use the root node of the repository.

To write to the file CHANGELOG.md run:

mix changex.update

The following options are also available:

Option          Description
----------      ------
--file          Change the file for the output to be written to. Defaults to CHANGELOG.md
--format        Change the output format. One of markdown or elixir, defaults to markdown
--github        Include link to commit on GitHub when outputting the hash of
                the commit. Should be in the format `/user/repo`

Contributing

Changex uses GitCop to automatically check for formatting of the commit messages. Any pull request will automatically be checked against the rules specified in this repository.

Please read CONTRIBUTING.md.

License

Please read LICENSE.txt.