Hi all,
in a rebar3 application that I deploy with releases,
I set the application version in the myapp.app.src file,
and the release version in the rebar.config (relx section).
- Are those two versions meant to be different?
- Is there a way to have both in the same place, to simplify deploying a new version?
I don’t need any hot code upgrade or distribution.
Cheers
Use semver (Semantic Versioning):
% myapp.app.src
{application, myapp, [
{vsn, semver}
]}.
relx also accepts it, see.
Using semver automatically uses the latest Git tag on a repository to construct the version number.
Search for Version type: Basic Usage | Rebar3
1 Like
Ah! I completely missed the fact myapp.app.src supports that as well, thank you!
1 Like
I found this article from Roger Lipscombe useful:
We are using this technique on most of our Erlang projects, and it is quite effective.