summaryrefslogtreecommitdiff
path: root/src/rebar_utils.erl
diff options
context:
space:
mode:
authorjoewilliams <joe@joetify.com>2011-02-16 09:46:40 -0800
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2011-02-17 17:13:19 +0100
commit4e8dcfbfade08b48fe38bfe041459960b0ff74c3 (patch)
tree0692a946e174c73ea94d4bd1bd69633c7b72e3b0 /src/rebar_utils.erl
parent377c9e86d5f8e8cf24cc2b2feab54bda067f569b (diff)
Clean up rebar_appups and rebar_upgrade
Diffstat (limited to 'src/rebar_utils.erl')
-rw-r--r--src/rebar_utils.erl35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index dc7de9b..2822c0f 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -38,9 +38,6 @@
abort/2,
escript_foldl/3,
find_executable/1,
- get_reltool_release_info/1,
- get_rel_release_info/2,
- get_previous_release_path/0,
prop_check/3]).
-include("rebar.hrl").
@@ -155,38 +152,6 @@ find_executable(Name) ->
"\"" ++ filename:nativename(Path) ++ "\""
end.
-%% Get release name and version from a reltool.config
-get_reltool_release_info(ReltoolFile) ->
- %% expect sys to be the first proplist in reltool.config
- case file:consult(ReltoolFile) of
- {ok, [{sys, Config}| _]} ->
- %% expect the first rel in the proplist to be the one you want
- {rel, Name, Ver, _} = proplists:lookup(rel, Config),
- {Name, Ver};
- _ ->
- ?ABORT("Failed to parse ~s~n", [ReltoolFile])
- end.
-
-%% Get release name and version from a rel file
-get_rel_release_info(Name, Path) ->
- [RelFile] = filelib:wildcard(filename:join([Path, "releases", "*",
- Name ++ ".rel"])),
- [BinDir|_] = re:replace(RelFile, Name ++ "\\.rel", ""),
- {ok, [{release, {Name1, Ver}, _, _}]} =
- file:consult(filename:join([binary_to_list(BinDir),
- Name ++ ".rel"])),
- {Name1, Ver}.
-
-%% Get the previous release path from a global variable
-get_previous_release_path() ->
- case rebar_config:get_global(previous_release, false) of
- false ->
- ?ABORT("previous_release=PATH is required to "
- "create upgrade package~n", []);
- OldVerPath ->
- OldVerPath
- end.
-
%% Helper function for checking values and aborting when needed
prop_check(true, _, _) -> true;
prop_check(false, Msg, Args) -> ?ABORT(Msg, Args).