aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_release.erl
diff options
context:
space:
mode:
authorJordan Wilberding <[email protected]>2015-11-21 11:45:19 -0800
committerJordan Wilberding <[email protected]>2015-11-21 11:45:19 -0800
commitc81e404b40c3f2427a60a3f4c9192081839e3398 (patch)
tree9a2c7260def1d0553da988b06447c9447b4b4fa6 /src/rlx_release.erl
parent32b1831e15d6a02e9e233df48e5948b0c7228fbd (diff)
parent671018774204bfb63d114a6829928fde991e9ead (diff)
downloadrelx-c81e404b40c3f2427a60a3f4c9192081839e3398.tar.gz
relx-c81e404b40c3f2427a60a3f4c9192081839e3398.tar.bz2
relx-c81e404b40c3f2427a60a3f4c9192081839e3398.zip
Merge pull request #414 from tsloughter/per_rel_config_overrides
support overriding config values with per-release config values
Diffstat (limited to 'src/rlx_release.erl')
-rw-r--r--src/rlx_release.erl14
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).