tmbb
A script to help when releasing new versions for packages
Releasing new versions for a package is a chore. You have to run the tests, add a tag to your repo, publish on hex, etc. This is something we should automate. Inspired by this article here: Hypothesis, I’ve written a script to make it much easier. You can find it here: A script to automatie releases of elixir packages. · GitHub
Unlike the example from the Hypothesis project above, this isn’t triggered by a commit to the master branch. This is just a script you can add to your project. If you add this script as an alias (for example, release) to your mix file, and follow some simple conventions, you can generate a release with mix release.
This will:
-
Run your tests (and interrupt is they fail).
-
Read a special RELEASE.md file which you have to create and contains a line which specifies which type of release it is (patch, minor or major), as well as the text for the changelog entry
-
Bump the current version and set it in your mix.exs file (it assumes you have a line of the form
@version "x.x.x") -
Commit the changes to git and add a tag with the version number so that it is easy to track in the repo
-
Publish the package on hex
For more details, just read the script. This script is something you’ll want to customize to your workflow, so I won’t package this in any way, Just dump this script somewhere in your mix project, set the alias and you’re good to go.
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








