Expublish
Automate elixir package version and changelog management.
The new publish task 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, "~> 1.1", 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 publish.(major|minor|patch)
.
$ mix publish.minor
Reference
Usage: mix publish.[level] [options]
level:
major - Publish new major version
minor - Publish new minor version
patch - Publish new patch version
options:
-d, --dry-run - Dry run (no writes, no commits)
--branch=string - Remote branch to push to, default: "master"
--remote=string - Remote name to push to, default: "origin"
--skip-publish - Disable hex publish
--skip-push - Disable git push
--skip-test - Disable test run