diff options
| author | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-02-17 10:35:50 -0600 |
|---|---|---|
| committer | Tristan Sloughter <tristan.sloughter@gmail.com> | 2015-02-17 10:35:50 -0600 |
| commit | 43a18bf4fa55a7ef23a6da837ba4450996fe8725 (patch) | |
| tree | 14a08750177ecf866353583dd8d7549f0ba30864 /src/rebar_app_utils.erl | |
| parent | d65e6da7dae7a205050befb76752b58721660ff9 (diff) | |
| parent | 501b9b42dfa4c06bc1d537e810f2e4d730e5d8f7 (diff) | |
Merge pull request #145 from tsloughter/hex
Replace package management with hex.pm
Diffstat (limited to 'src/rebar_app_utils.erl')
| -rw-r--r-- | src/rebar_app_utils.erl | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/src/rebar_app_utils.erl b/src/rebar_app_utils.erl index f991e4e..2b63519 100644 --- a/src/rebar_app_utils.erl +++ b/src/rebar_app_utils.erl @@ -31,12 +31,9 @@ is_app_dir/0, is_app_dir/1, is_app_src/1, app_src_to_app/1, - app_name/2, - app_applications/2, + load_app_file/2, app_vsn/2]). --export([load_app_file/2]). % TEMPORARY - -include("rebar.hrl"). %% =================================================================== @@ -94,24 +91,6 @@ app_src_to_app(Filename) -> filelib:ensure_dir(AppFile), AppFile. -app_name(Config, AppFile) -> - case load_app_file(Config, AppFile) of - {ok, NewConfig, AppName, _} -> - {NewConfig, AppName}; - {error, Reason} -> - ?ABORT("Failed to extract name from ~s: ~p\n", - [AppFile, Reason]) - end. - -app_applications(Config, AppFile) -> - case load_app_file(Config, AppFile) of - {ok, NewConfig, _, AppInfo} -> - {NewConfig, get_value(applications, AppInfo, AppFile)}; - {error, Reason} -> - ?ABORT("Failed to extract applications from ~s: ~p\n", - [AppFile, Reason]) - end. - app_vsn(Config, AppFile) -> case load_app_file(Config, AppFile) of {ok, Config1, _, AppInfo} -> @@ -123,10 +102,6 @@ app_vsn(Config, AppFile) -> [AppFile, Reason]) end. -%% =================================================================== -%% Internal functions -%% =================================================================== - load_app_file(_State, undefined) -> {error, missing_app_file}; load_app_file(State, Filename) -> AppFile = {app_file, Filename}, @@ -147,6 +122,10 @@ load_app_file(State, Filename) -> {ok, State, AppName, AppData} end. +%% =================================================================== +%% Internal functions +%% =================================================================== + %% In the case of *.app.src we want to give the user the ability to %% dynamically script the application resource file (think dynamic version %% string, etc.), in a way similar to what can be done with the rebar |
