aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_state.erl
diff options
context:
space:
mode:
authorJordan Wilberding <[email protected]>2014-05-14 15:31:54 +0200
committerJordan Wilberding <[email protected]>2014-05-14 15:31:54 +0200
commit84b176094d06ff22b3c495fa90976e9aaa4a04f2 (patch)
tree5c6f08c210e1746e4e0398c7cf42c0ee593427a2 /src/rlx_state.erl
parent184f6d067557bdb21334e8e6fb4129711eadab36 (diff)
parent58483667f599433d9843445159522b8f0353419c (diff)
downloadrelx-84b176094d06ff22b3c495fa90976e9aaa4a04f2.tar.gz
relx-84b176094d06ff22b3c495fa90976e9aaa4a04f2.tar.bz2
relx-84b176094d06ff22b3c495fa90976e9aaa4a04f2.zip
Merge pull request #175 from tsloughter/new_output
breaking change: output release to <output_dir>/<release_name>/
Diffstat (limited to 'src/rlx_state.erl')
-rw-r--r--src/rlx_state.erl16
1 files changed, 11 insertions, 5 deletions
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()].