|
@ -9,6 +9,8 @@ main(_Args) -> |
|
|
application:start(public_key), |
|
|
application:start(public_key), |
|
|
application:start(ssl), |
|
|
application:start(ssl), |
|
|
inets:start(), |
|
|
inets:start(), |
|
|
|
|
|
inets:start(httpc, [{profile, rebar}]), |
|
|
|
|
|
set_httpc_options(), |
|
|
|
|
|
|
|
|
%% Fetch and build deps required to build rebar3 |
|
|
%% Fetch and build deps required to build rebar3 |
|
|
BaseDeps = [{providers, []} |
|
|
BaseDeps = [{providers, []} |
|
@ -82,10 +84,10 @@ extract(Binary) -> |
|
|
{ok, Contents}. |
|
|
{ok, Contents}. |
|
|
|
|
|
|
|
|
request(Url) -> |
|
|
request(Url) -> |
|
|
set_httpc_options(), |
|
|
|
|
|
case httpc:request(get, {Url, []}, |
|
|
case httpc:request(get, {Url, []}, |
|
|
[{relaxed, true}], |
|
|
[{relaxed, true}], |
|
|
[{body_format, binary}]) of |
|
|
|
|
|
|
|
|
[{body_format, binary}], |
|
|
|
|
|
rebar) of |
|
|
{ok, {{_Version, 200, _Reason}, _Headers, Body}} -> |
|
|
{ok, {{_Version, 200, _Reason}, _Headers, Body}} -> |
|
|
{ok, Body}; |
|
|
{ok, Body}; |
|
|
Error -> |
|
|
Error -> |
|
@ -114,7 +116,7 @@ set_httpc_options(_, []) -> |
|
|
|
|
|
|
|
|
set_httpc_options(Scheme, Proxy) -> |
|
|
set_httpc_options(Scheme, Proxy) -> |
|
|
{ok, {_, _, Host, Port, _, _}} = http_uri:parse(Proxy), |
|
|
{ok, {_, _, Host, Port, _, _}} = http_uri:parse(Proxy), |
|
|
httpc:set_options([{Scheme, {{Host, Port}, []}}]). |
|
|
|
|
|
|
|
|
httpc:set_options([{Scheme, {{Host, Port}, []}}], rebar). |
|
|
|
|
|
|
|
|
compile(App, FirstFiles) -> |
|
|
compile(App, FirstFiles) -> |
|
|
Dir = filename:join(filename:absname("_build/default/lib/"), App), |
|
|
Dir = filename:join(filename:absname("_build/default/lib/"), App), |
|
|