diff options
author | Jordan Wilberding <[email protected]> | 2013-10-28 16:48:04 -0700 |
---|---|---|
committer | Jordan Wilberding <[email protected]> | 2013-10-28 16:48:04 -0700 |
commit | 10620765c5028c24d57caba20b8e86b98351e3a5 (patch) | |
tree | 888a17e6eef5fcf3241af84645144d76eec89abe /src/rlx_app_info.erl | |
parent | d10c5f544741367feae2c30d0e9738ef5edacdf5 (diff) | |
parent | 7a1083d2a881b511e202edd0e2ff2b207e23ae5b (diff) | |
download | relx-10620765c5028c24d57caba20b8e86b98351e3a5.tar.gz relx-10620765c5028c24d57caba20b8e86b98351e3a5.tar.bz2 relx-10620765c5028c24d57caba20b8e86b98351e3a5.zip |
Merge pull request #89 from ericbmerritt/master
support using the original app vsn as a string not the parsed vsn
Diffstat (limited to 'src/rlx_app_info.erl')
-rw-r--r-- | src/rlx_app_info.erl | 10 |
1 files changed, 9 insertions, 1 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))). |