Module rebar3

Main module for rebar3.

Description

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.

Function Index

global_option_spec_list/0options accepted via getopt.
init_config/0set 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/0get log level based on getopt options and ENV.
main/0For running with: erl +sbtu +A1 -noinput -mode minimal -boot start_clean -s rebar3 main -extra "$@".
main/1escript Entry point.
parse_args/1Parse 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/2Erlang-API entry point.
version/0show version information.

Function Details

global_option_spec_list/0

global_option_spec_list() -> [{atom(), char(), string(), atom(), string()}, ...]

options accepted via getopt

init_config/0

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/0

log_level() -> integer()

get log level based on getopt options and ENV

main/0

main() -> no_return()

For running with: erl +sbtu +A1 -noinput -mode minimal -boot start_clean -s rebar3 main -extra "$@"

main/1

main(Args::list()) -> no_return()

escript Entry point

parse_args/1

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/2

run(BaseState::rebar_state:t(), Commands::[string()]) -> {ok, rebar_state:t()} | {error, term()}

Erlang-API entry point

version/0

version() -> ok

show version information


Generated by EDoc