diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2015-03-23 21:27:47 -0700 |
---|---|---|
committer | Fred Hebert <mononcqc@ferd.ca> | 2015-03-23 21:27:47 -0700 |
commit | 4821b923238cfe94de7ad8824c5c9ecf88275563 (patch) | |
tree | 7b5857e2e417050ab59c2c35bc68f2193ce2f4af /src/rebar_dir.erl | |
parent | 63fb911303d57294c8e5f8a291026ca6b5f3709c (diff) | |
parent | 5e58823fd67703d7bfeb0b6f4848d9af2c292b9a (diff) |
Merge pull request #286 from tsloughter/checkouts
treat _checkouts as deps that are always compiled
Diffstat (limited to 'src/rebar_dir.erl')
-rw-r--r-- | src/rebar_dir.erl | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/rebar_dir.erl b/src/rebar_dir.erl index 628ebd3..4a9bf09 100644 --- a/src/rebar_dir.erl +++ b/src/rebar_dir.erl @@ -3,6 +3,8 @@ -export([base_dir/1, deps_dir/1, deps_dir/2, + checkouts_dir/1, + checkouts_dir/2, plugins_dir/1, lib_dirs/1, home_dir/0, @@ -40,6 +42,17 @@ deps_dir(State) -> deps_dir(DepsDir, App) -> filename:join(DepsDir, App). +root_dir(State) -> + rebar_state:get(State, root_dir, ?DEFAULT_ROOT_DIR). + +-spec checkouts_dir(rebar_state:t()) -> file:filename_all(). +checkouts_dir(State) -> + filename:join(root_dir(State), rebar_state:get(State, checkouts_dir, ?DEFAULT_CHECKOUTS_DIR)). + +-spec checkouts_dir(rebar_state:t(), file:filename_all()) -> file:filename_all(). +checkouts_dir(State, App) -> + filename:join(checkouts_dir(State), App). + -spec plugins_dir(rebar_state:t()) -> file:filename_all(). plugins_dir(State) -> case lists:member(global, rebar_state:current_profiles(State)) of |