瀏覽代碼

Expose Erlang API for invoking rebar

pull/3/head
Dave Smith 12 年之前
父節點
當前提交
a2fb8fdc39
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. +7
    -0
      src/rebar.erl

+ 7
- 0
src/rebar.erl 查看文件

@ -27,6 +27,7 @@
-module(rebar).
-export([main/1,
run/2,
help/0,
parse_args/1,
version/0,
@ -52,6 +53,7 @@
%% Public API
%% ====================================================================
%% escript Entry point
main(Args) ->
case catch(run(Args)) of
ok ->
@ -65,6 +67,11 @@ main(Args) ->
rebar_utils:delayed_halt(1)
end.
%% Erlang-API entry point
run(BaseConfig, Commands) ->
application:load(rebar),
run_aux(BaseConfig, Commands).
%% ====================================================================
%% Internal functions
%% ====================================================================

Loading…
取消
儲存