diff options
author | Tristan Sloughter <[email protected]> | 2015-11-21 09:37:28 -0600 |
---|---|---|
committer | Tristan Sloughter <[email protected]> | 2015-11-21 09:38:07 -0600 |
commit | 671018774204bfb63d114a6829928fde991e9ead (patch) | |
tree | 9a2c7260def1d0553da988b06447c9447b4b4fa6 /src/rlx_release.erl | |
parent | 32b1831e15d6a02e9e233df48e5948b0c7228fbd (diff) | |
download | relx-671018774204bfb63d114a6829928fde991e9ead.tar.gz relx-671018774204bfb63d114a6829928fde991e9ead.tar.bz2 relx-671018774204bfb63d114a6829928fde991e9ead.zip |
support overriding config values with per-release config values
Diffstat (limited to 'src/rlx_release.erl')
-rw-r--r-- | src/rlx_release.erl | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/rlx_release.erl b/src/rlx_release.erl index 97187a6..bf14a9e 100644 --- a/src/rlx_release.erl +++ b/src/rlx_release.erl @@ -40,6 +40,8 @@ metadata/1, start_clean_metadata/1, canonical_name/1, + config/1, + config/2, format/1, format/2, format_error/1]). @@ -63,7 +65,8 @@ annotations = undefined :: annotations(), applications = [] :: [application_spec()], relfile :: undefined | string(), - app_detail = [] :: [rlx_app_info:t()]}). + app_detail = [] :: [rlx_app_info:t()], + config = []}). %%============================================================================ %% types @@ -201,6 +204,15 @@ canonical_name(#release_t{name=Name, vsn=Vsn}) -> erlang:binary_to_list(erlang:iolist_to_binary([erlang:atom_to_list(Name), "-", Vsn])). + +-spec config(t(), list()) -> t(). +config(Release, Config) -> + Release#release_t{config=Config}. + +-spec config(t()) -> list(). +config(#release_t{config=Config}) -> + Config. + -spec format(t()) -> iolist(). format(Release) -> format(0, Release). |