diff options
Diffstat (limited to 'src/rebar_app_info.erl')
-rw-r--r-- | src/rebar_app_info.erl | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/src/rebar_app_info.erl b/src/rebar_app_info.erl index 91640f2..247e5f4 100644 --- a/src/rebar_app_info.erl +++ b/src/rebar_app_info.erl @@ -34,6 +34,8 @@ source/2, state/1, state/2, + is_lock/1, + is_lock/2, is_checkout/1, is_checkout/2, valid/1, @@ -41,22 +43,23 @@ -export_type([t/0]). --record(app_info_t, {name :: binary(), - app_file_src :: file:filename_all() | undefined, - app_file :: file:filename_all() | undefined, - config :: rebar_state:t() | undefined, - original_vsn :: binary() | string() | undefined, - app_details=[] :: list(), - applications=[] :: list(), - deps=[] :: list(), +-record(app_info_t, {name :: binary(), + app_file_src :: file:filename_all() | undefined, + app_file :: file:filename_all() | undefined, + config :: rebar_state:t() | undefined, + original_vsn :: binary() | string() | undefined, + app_details=[] :: list(), + applications=[] :: list(), + deps=[] :: list(), profiles=[default] :: [atom()], - dep_level=0 :: integer(), - dir :: file:name(), - out_dir :: file:name(), - source :: string() | tuple() | undefined, - state :: rebar_state:t() | undefined, - is_checkout=false :: boolean(), - valid :: boolean()}). + dep_level=0 :: integer(), + dir :: file:name(), + out_dir :: file:name(), + source :: string() | tuple() | undefined, + state :: rebar_state:t() | undefined, + is_lock=false :: boolean(), + is_checkout=false :: boolean(), + valid :: boolean()}). %%============================================================================ %% types @@ -254,6 +257,14 @@ state(AppInfo=#app_info_t{}, State) -> state(#app_info_t{state=State}) -> State. +-spec is_lock(t(), boolean()) -> t(). +is_lock(AppInfo=#app_info_t{}, IsLock) -> + AppInfo#app_info_t{is_lock=IsLock}. + +-spec is_lock(t()) -> boolean(). +is_lock(#app_info_t{is_lock=IsLock}) -> + IsLock. + -spec is_checkout(t(), boolean()) -> t(). is_checkout(AppInfo=#app_info_t{}, IsCheckout) -> AppInfo#app_info_t{is_checkout=IsCheckout}. |