Adds `mix` tasks to easily issue (publish) new versions to `hex`.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
img
lib
test
.gitignore
.travis.yml
README.md
mix.exs
mix.lock

README.md

Issuer

Build Status

{:ok, app |> version_bump |> git_tag_commit_push |> hex publish} = `mix issuer`

Installation

TODO: http://elixir-lang.org/docs/stable/mix/Mix.Project.html#in_project/4

NB: Starting with version 0.2 we store the interfaces in file config/INTERFACES to compare against current version and suggest whether minor version might be updated, or interfaces were changed drastically. Just add this file to your git repo to avoid “Unstaged changes:\n?? config/INTERFACES” error on git check.

Add issuer to your list of dependencies in mix.exs:

def deps do
  [{:issuer, "~> 0.2.2", only: :dev}]
end

Usage

Run mix issuer to automate subsequent running of:

mix test && \
  confirm_suggested_version && \           # ⇐ will load versions, suggest the succ and ask about
  patch_version_in_VERSION_and_README && \ # ⇐ will [safely] replace version to current in files
  git commit -am ":paperclip: Bump version." && \
  git push && \
  git tag VERSION_CHOSEN_IN_STEP_2 && \
  git push --tags && \
  hex publish

NB: on the first run it will move the version declaration out of mix.exs to config/VERSION. I am not very proud of this solution, but I found it better than modifying mix.exs on each subsequent run.

FAQ

Q: Is it of any good?
A: Yes, it is.

Q: Is issuer itself being published with issuer?
A: Indeed.

Q: Won’t it ruin my project?
A: Well, it could, but you have the project source versioned, haven’t you?

Q: What happens if any step failed?
A: It’s Elixir, we just let the castle crash. hex publish is executed if and only all previous steps succeeded.

How it looks like:

Screenshot

Eastern Egg

Add:

def deps do
  [{:ex_ncurses, git: "https://github.com/jfreeze/ex_ncurses.git", only: :dev}]
end

to your project’s mix.exs to be asked about version in fancy ncurses-based colorful manner :)

Docs

https://hexdocs.pm/issuer

License

MIT