diff options
author | Tristan Sloughter <[email protected]> | 2014-05-04 18:03:47 -0500 |
---|---|---|
committer | Tristan Sloughter <[email protected]> | 2014-05-09 20:12:06 -0500 |
commit | 58483667f599433d9843445159522b8f0353419c (patch) | |
tree | 72add2561969a6714f51340eb7752ea65d951bc9 /src | |
parent | 4c50cb6ab933cd08f51763f9a62436271d9962f5 (diff) | |
download | relx-58483667f599433d9843445159522b8f0353419c.tar.gz relx-58483667f599433d9843445159522b8f0353419c.tar.bz2 relx-58483667f599433d9843445159522b8f0353419c.zip |
breaking change: output release to <output_dir>/<release_name>/
Diffstat (limited to 'src')
-rw-r--r-- | src/rlx_prv_config.erl | 2 | ||||
-rw-r--r-- | src/rlx_state.erl | 16 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/rlx_prv_config.erl b/src/rlx_prv_config.erl index 7c2ace0..9efd8a0 100644 --- a/src/rlx_prv_config.erl +++ b/src/rlx_prv_config.erl @@ -200,7 +200,7 @@ load_terms({sys_config, SysConfig}, {ok, State}) -> {ok, State} end; load_terms({output_dir, OutputDir}, {ok, State}) -> - {ok, rlx_state:output_dir(State, filename:absname(OutputDir))}; + {ok, rlx_state:base_output_dir(State, filename:absname(OutputDir))}; load_terms({overlay_vars, OverlayVars}, {ok, State}) -> CurrentOverlayVars = rlx_state:get(State, overlay_vars), NewOverlayVars0 = list_of_overlay_vars_files(OverlayVars), diff --git a/src/rlx_state.erl b/src/rlx_state.erl index c3c3176..5b488c8 100644 --- a/src/rlx_state.erl +++ b/src/rlx_state.erl @@ -26,8 +26,9 @@ -export([new/2, log/1, actions/1, - output_dir/1, - output_dir/2, + output_dir/1, + base_output_dir/1, + base_output_dir/2, lib_dirs/1, add_lib_dirs/2, overrides/1, @@ -185,11 +186,16 @@ log(#state_t{log=LogState}) -> LogState. -spec output_dir(t()) -> file:name(). -output_dir(#state_t{output_dir=OutDir}) -> +output_dir(State=#state_t{output_dir=OutDir}) -> + {RelName, _RelVsn} = default_configured_release(State), + filename:join(OutDir, RelName). + +-spec base_output_dir(t()) -> file:name(). +base_output_dir(#state_t{output_dir=OutDir}) -> OutDir. --spec output_dir(t(), Directory::file:filename()) -> t(). -output_dir(State, Directory) -> +-spec base_output_dir(t(), Directory::file:filename()) -> t(). +base_output_dir(State, Directory) -> State#state_t{output_dir=Directory}. -spec lib_dirs(t()) -> [file:name()]. |