Main module for rebar3. Supports two interfaces; one for escripts, and one for usage as a library (although rebar3 makes a lot of assumptions about its environment, making it a bit tricky to use as a lib).
This module's job is mostly to set up the root environment for rebar3 and handle global options (mostly all from the ENV) and make them accessible to the rest of the run.| global_option_spec_list/0 | options accepted via getopt. |
| init_config/0 | set up base configuration having to do with verbosity, where to find config files, and so on, and return an internal rebar3 state term. |
| log_level/0 | get log level based on getopt options and ENV. |
| main/0 | For running with: erl +sbtu +A1 -noinput -mode minimal -boot start_clean -s rebar3 main -extra "$@". |
| main/1 | escript Entry point. |
| parse_args/1 | Parse basic rebar3 arguments to find the top-level task
to be run; this parsing is only partial from the point of view that
runs done with arguments like as $PROFILE do $TASK will just
return as, which is then in charge of doing a more dynamic
dispatch. |
| run/2 | Erlang-API entry point. |
| version/0 | show version information. |
global_option_spec_list() -> [{atom(), char(), string(), atom(), string()}, ...]
options accepted via getopt
init_config() -> rebar_state:t()
set up base configuration having to do with verbosity, where to find config files, and so on, and return an internal rebar3 state term.
log_level() -> integer()
get log level based on getopt options and ENV
main() -> no_return()
For running with: erl +sbtu +A1 -noinput -mode minimal -boot start_clean -s rebar3 main -extra "$@"
main(Args::list()) -> no_return()
escript Entry point
parse_args(Rest::[string()]) -> {atom(), [string()]}
Parse basic rebar3 arguments to find the top-level task
to be run; this parsing is only partial from the point of view that
runs done with arguments like as $PROFILE do $TASK will just
return as, which is then in charge of doing a more dynamic
dispatch.
If no arguments are given, the help task is returned.
If special arguments like -h or -v are translated to help
and version tasks.
The unparsed parts of arguments are returned in:
{Task, Rest}.
run(BaseState::rebar_state:t(), Commands::[string()]) -> {ok, rebar_state:t()} | {error, term()}
Erlang-API entry point
version() -> ok
show version information
Generated by EDoc