diff options
author | Eric <[email protected]> | 2013-10-15 10:28:20 -0700 |
---|---|---|
committer | Eric <[email protected]> | 2013-10-15 13:22:24 -0700 |
commit | 51b7508737fd7668d000781c6502361e132cbbc4 (patch) | |
tree | 395c66c9be2e2b2c0f092ad4e445133a0c3897d2 /src/rlx_state.erl | |
parent | a54bb2bd0c8f540a7bed3b3aa7e6732b131d7bb4 (diff) | |
download | relx-51b7508737fd7668d000781c6502361e132cbbc4.tar.gz relx-51b7508737fd7668d000781c6502361e132cbbc4.tar.bz2 relx-51b7508737fd7668d000781c6502361e132cbbc4.zip |
add a dev mode that symlinks the release instead of copying it
This should only ever be used for development, however it makes it
very, very nice to be able to simple recompile a project without
recopying it to try new things.
Diffstat (limited to 'src/rlx_state.erl')
-rw-r--r-- | src/rlx_state.erl | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/rlx_state.erl b/src/rlx_state.erl index b196e8d..81f9fca 100644 --- a/src/rlx_state.erl +++ b/src/rlx_state.erl @@ -61,6 +61,8 @@ put/3, caller/1, caller/2, + dev_mode/1, + dev_mode/2, upfrom/1, format/1, format/2]). @@ -88,6 +90,7 @@ skip_apps=[] :: [AppName::atom()], configured_releases :: releases(), realized_releases :: releases(), + dev_mode=false :: boolean(), upfrom :: string() | binary() | undefined, config_values :: ec_dictionary:dictionary(Key::atom(), Value::term())}). @@ -209,7 +212,7 @@ vm_args(#state_t{vm_args=VmArgs}) -> -spec vm_args(t(), file:filename()) -> t(). vm_args(State, VmArgs) -> - State#state_t{vm_args=VmArgs}. + State#state_t{vm_args=VmArgs}. -spec sys_config(t()) -> file:filename() | undefined. sys_config(#state_t{sys_config=SysConfig}) -> @@ -317,6 +320,15 @@ caller(#state_t{caller=Caller}) -> caller(S, Caller) -> S#state_t{caller=Caller}. +-spec dev_mode(t()) -> boolean(). +dev_mode(#state_t{dev_mode=DevMode}) -> + DevMode. + +-spec dev_mode(t(), boolean()) -> t(). +dev_mode(S, DevMode) -> + S#state_t{dev_mode=DevMode}. + + -spec upfrom(t()) -> string() | binary() | undefined. upfrom(#state_t{upfrom=UpFrom}) -> UpFrom. |