dorgan
When building a release with elixir 1.9.x mix generates a _build/prod/rel/my_app folder, with a directory structure like the following:
bin/
|-my_app
erts-vsn/
lib/
|-app-x.x.x
|-dep1-x.x.x
|-dep2-x.x.x
|-depn-x-x-x
releases/
|-vsn/
|-COOKIE
|-start_erl.data
Say my app is in version 0.1.0, when I build the release with mix release, it will compile the whole project the first time and create a directory my_app-0.1.0 in _build/prod/rel/my_app/lib containing the compiled .beam files and other assets.
Now say I bump my app version to 0.1.1 and run mix release again. This time it wont compile the files that were already compiled so this step will take less time than the first time. But it will create a my_app-0.1.1 directory with duplicated content from my_app-0.1.0.
This is also true for dependencies, so the issue can get out of hands pretty quickly.
Is there a way to prevent this, or to clean the old versions from the release? (something like mix phx.digest.clean)
I’ve noticed that in _build/prod/rel/my_app/releases/vsn there’s a my_app.rel written in erlang. It’s contents have the form:
%% coding: utf-8
{release, {"my_app", "current version"}, {erts, "erts version"},
[
{app1, version, _some_flag},
{app2, version, _some_flag},
...
]}.
The apps and versions there seem to be the latest ones. Maybe it could be used as a manifest to implement a mix release.clean task?
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 1 to 1- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
dorgan
Reading this commit it seems this issue was already solved and merged to master, but it didn’t make it to the 1.9.2 release