aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rlx_app_info.erl10
-rw-r--r--src/rlx_prv_assembler.erl4
-rw-r--r--src/rlx_prv_overlay.erl2
-rw-r--r--src/rlx_release.erl2
4 files changed, 13 insertions, 5 deletions
diff --git a/src/rlx_app_info.erl b/src/rlx_app_info.erl
index a738cb8..931c139 100644
--- a/src/rlx_app_info.erl
+++ b/src/rlx_app_info.erl
@@ -40,6 +40,7 @@
new/5,
name/1,
name/2,
+ original_vsn/1,
vsn/1,
vsn/2,
vsn_as_string/1,
@@ -60,6 +61,7 @@
-include("relx.hrl").
-record(app_info_t, {name :: atom(),
+ original_vsn :: string(),
vsn :: ec_semver:semver(),
dir :: file:name(),
link=false :: boolean(),
@@ -97,7 +99,9 @@ new(AppName, Vsn, Dir, ActiveDeps, LibraryDeps, Link)
{fail, _} ->
?RLX_ERROR({vsn_parse, AppName});
ParsedVsn ->
- {ok, #app_info_t{name=AppName, vsn=ParsedVsn, dir=Dir,
+ {ok, #app_info_t{name=AppName, original_vsn=Vsn,
+ vsn=ParsedVsn,
+ dir=Dir,
active_deps=ActiveDeps,
library_deps=LibraryDeps,
link=Link}}
@@ -116,6 +120,10 @@ name(AppInfo=#app_info_t{}, AppName)
vsn(#app_info_t{vsn=Vsn}) ->
Vsn.
+-spec original_vsn(t()) -> string().
+original_vsn(#app_info_t{original_vsn=Vsn}) ->
+ Vsn.
+
-spec vsn_as_string(t()) -> string().
vsn_as_string(#app_info_t{vsn=Vsn}) ->
erlang:binary_to_list(erlang:iolist_to_binary(ec_semver:format(Vsn))).
diff --git a/src/rlx_prv_assembler.erl b/src/rlx_prv_assembler.erl
index b840cfa..fba21ca 100644
--- a/src/rlx_prv_assembler.erl
+++ b/src/rlx_prv_assembler.erl
@@ -198,7 +198,7 @@ prepare_applications(State, Apps) ->
copy_app(LibDir, App, IncludeSrc) ->
AppName = erlang:atom_to_list(rlx_app_info:name(App)),
- AppVsn = rlx_app_info:vsn_as_string(App),
+ AppVsn = rlx_app_info:original_vsn(App),
AppDir = rlx_app_info:dir(App),
TargetDir = filename:join([LibDir, AppName ++ "-" ++ AppVsn]),
if
@@ -625,7 +625,7 @@ get_code_paths(Release, OutDir) ->
LibDir = filename:join(OutDir, "lib"),
[filename:join([LibDir,
erlang:atom_to_list(rlx_app_info:name(App)) ++ "-" ++
- rlx_app_info:vsn_as_string(App), "ebin"]) ||
+ rlx_app_info:original_vsn(App), "ebin"]) ||
App <- rlx_release:application_details(Release)].
unless_exists_write_default(Path, File) ->
diff --git a/src/rlx_prv_overlay.erl b/src/rlx_prv_overlay.erl
index a7a484f..e8d2547 100644
--- a/src/rlx_prv_overlay.erl
+++ b/src/rlx_prv_overlay.erl
@@ -196,7 +196,7 @@ generate_release_vars(Release) ->
-spec generate_app_vars(rlx_app_info:t()) -> AppInfo::tuple().
generate_app_vars(App) ->
{rlx_app_info:name(App),
- [{version, rlx_app_info:vsn_as_string(App)},
+ [{version, rlx_app_info:original_vsn(App)},
{dir, rlx_app_info:dir(App)},
{active_dependencies, rlx_app_info:active_deps(App)},
{library_dependencies, rlx_app_info:library_deps(App)},
diff --git a/src/rlx_release.erl b/src/rlx_release.erl
index ca3fa11..1d333bf 100644
--- a/src/rlx_release.erl
+++ b/src/rlx_release.erl
@@ -281,7 +281,7 @@ create_app_spec(Annots, App, ActiveApps, LibraryApps) ->
throw:not_found ->
{TypeAnnot, void}
end,
- Vsn = rlx_app_info:vsn_as_string(App),
+ Vsn = rlx_app_info:original_vsn(App),
case BaseAnnots of
{void, void} ->
{AppName, Vsn};