tmbb

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: https://hypothesis.works/articles/continuous-releases/, I’ve written a script to make it much easier. You can find it here: https://gist.github.com/tmbb/24ed381aa60abd5514072f44eaa91eaf#file-release-exs

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:

  1. Run your tests (and interrupt is they fail).

  2. 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

  3. 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")

  4. Commit the changes to git and add a tag with the version number so that it is easy to track in the repo

  5. 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.

Where Next?

Popular in Libraries Top

josevalim
Hi everyone, We would like to announce that Plataformatec is working on a new MySQL driver called MyXQL. Our goal is to eventually integ...
New
kip
Image is an image processing library for Elixir. It is based upon the fabulous vix library that provides a libvips wrapper for Elixir. I...
574 16576 179
New
nikokozak
Hello all, I’ve been working on Svonix - a library for quickly integrating Svelte components into Phoenix views. It’s a much-needed succ...
New
arkgil
Hi all! I’m happy to announce that Telemetry v0.3.0 is out! This release marks the conversion from Elixir to Erlang so that all the libr...
New
New
benlime
I created a new library GitHub - benvp/ex_cva: Class Variance Authority for Elixir which aims to make it very easy to define different va...
New
Antrater
Hi everyone! I’m thrilled to announce a huge thing. We have been developing Elixir Moon Design System for quite a while. We are finally ...
New
bryanjos
Hi, I wanted share a small library we at Revelry Labs made for rendering react components from the server side. There are instructions fo...
New
mattludwigs
Grizzly is a library for working with Z-Wave devices. Z-Wave is a low-frequency radio protocol for controlling smart home devices on a me...
New
bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
381 12391 119
New

Other popular topics Top

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

Sub Categories:

We're in Beta

About us Mission Statement