idi527

idi527

How do you manage app versions in releases?

Both those set in distillery’s rel/config.exs

release :my_release do
  set(version: "0.1.1") # <--- here

  set(
    applications: [
      # ...
    ]
  )
end

and in each app’s mix.exs

  def project do
    [
      app: :my_app,
      version: "0.1.5", # <--- here
      # ...
    ]
  end

So far I’ve been naively setting them manually, but I’d like to somehow automate the process.

I’ve been thinking about setting the release version to a unix timestamp before each call to mix release. Are there any potential downsides to it? I mostly need it for hot code upgrades.

What can I do about individual app’s versions? Read them from environmental variables and add a pre-commit git hook that would increment those?

Most Liked

LostKobrakai

LostKobrakai

That’s what is in my rel/config.exs: set version: current_version(:my_app)

LostKobrakai

LostKobrakai

That’s from the elixir Version docs:

Build information can be added by appending +[0-9A-Za-z-.]:
"1.0.0-alpha.3+20130417140000"

So you could append the timestamps for different builds and use the release version for actually versionable changes in the umbrella topology.

gregvaughn

gregvaughn

I’m not entirely happy with it, but for the time being each app in the umbrella sets its version by doing a Code.eval_file call to a common compile-time .exs file that reads the current git SHA and appends it to the base version.

Where Next?

Popular in Discussions Top

New
kostonstyle
Hi all How can I compare haskell with elixir, included tools, webservices, ect. Thanks
New
CharlesO
Erlang :list.nth simple, but 1 - based nth(1, [H|_]) -&gt; H; nth(N, [_|T]) when N &gt; 1 -&gt; nth(N - 1, T). Elixir Enum.at … coo...
New
AstonJ
If a newbie asked you about Phoenix Contexts, how would you explain the basics to them? Feel free to be as concise or in-depth as you li...
New
und0ck3d
Hello everyone! A few days ago I’ve created a topic here about how people were creating CMSs with Elixir and Phoenix. I’ve been studying...
New
Qqwy
Looking at the stacks that existing large companies have used, WhatsApp internally uses Mnesia to store the messages, while Discord uses ...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
Fl4m3Ph03n1x
Background This question comes mainly from my ignorance. Today is Black Friday, one of my favorite days of the year to buy books. One boo...
New
arpan
Hello everyone :wave: Today I am very excited to announce a project that I have been working on for almost 3 months now. The project is...
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New

Other popular topics Top

RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52673 488
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 43487 311
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement