diff options
author | Tristan Sloughter <t@crashfast.com> | 2015-03-31 20:39:55 -0500 |
---|---|---|
committer | Tristan Sloughter <t@crashfast.com> | 2015-04-02 13:29:03 -0500 |
commit | bff483a570ca6003244445899abbc479ec1f9395 (patch) | |
tree | bc5dde9a1d0a6390ebb8b3a54cdb79f0968d8b3e | |
parent | ef60d3b51f0d1fd89ac56675463c00d990002adc (diff) |
add exports used by plugins to rebar_api
-rw-r--r-- | src/rebar_api.erl | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/rebar_api.erl b/src/rebar_api.erl index a01391d..3fc7f61 100644 --- a/src/rebar_api.erl +++ b/src/rebar_api.erl @@ -5,7 +5,11 @@ -include_lib("providers/include/providers.hrl"). -export([abort/0, abort/2, console/2, - debug/2, info/2, warn/2, error/2]). + debug/2, info/2, warn/2, error/2, + expand_env_variable/3, + get_arch/0, + wordsize/0]). + -export_type([rebar_dict/0, rebar_digraph/0]). %%%%%%%%%%%%%%%%%%%%%%% @@ -30,3 +34,17 @@ info(Str, Args) -> ?INFO(Str, Args). warn(Str, Args) -> ?WARN(Str, Args). %% @doc logs with severity `error' error(Str, Args) -> ?ERROR(Str, Args). + +%% +%% Given env. variable FOO we want to expand all references to +%% it in InStr. References can have two forms: $FOO and ${FOO} +%% The end of form $FOO is delimited with whitespace or eol +%% +expand_env_variable(InStr, VarName, RawVarValue) -> + rebar_utils:expand_env_variable(InStr, VarName, RawVarValue). + +get_arch() -> + rebar_utils:get_arch(). + +wordsize() -> + rebar_utils:wordsize(). |