Hex.pm Hexdocs.pm Github.com

Expublish

Automate elixir package version and changelog management. Using mix expublish guarantees:

  • A clean git working directory
  • Passing tests
  • Increased version in mix.exs
  • New changelog entry
  • Commit, tag and git push
  • Hex publish

How to install

Add :expublish to your dev dependencies in mix.exs:

{:expublish, "~> 2.0", only: [:dev]}

Create a CHANGELOG.md in the root folder of your project. It must contain a placeholder:

<!-- %% CHANGELOG_ENTRIES %% -->

How to use

Create a RELEASE.md containing the new changelog entry.

$ echo "- changelog entry one\n- changelog entry two" > RELEASE.md

Run one of mix expublish.(major|minor|patch).

$ mix expublish.minor

Reference

Usage: mix expublish.[level] [options]

level:
  major - Publish major version
  minor - Publish minor version
  patch - Publish patch version

options:
  -d, --dry-run       - Perform dry run (no writes, no commits)
  --branch=string     - Remote branch to push to, default: "master"
  --remote=string     - Remote name to push to, default: "origin"
  --disable-publish   - Disable hex publish
  --disable-push      - Disable git push
  --disable-test      - Disable test run