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
That’s what is in my rel/config.exs: set version: current_version(:my_app)
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
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.
Popular in Discussions
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









