Browse Source

remove unused functions from app utils

pull/145/head
Tristan Sloughter 10 years ago
parent
commit
b654272063
1 changed files with 5 additions and 26 deletions
  1. +5
    -26
      src/rebar_app_utils.erl

+ 5
- 26
src/rebar_app_utils.erl View File

@ -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

Loading…
Cancel
Save