Current section

Files

Jump to
xref_runner rebar.config.script
Raw

rebar.config.script

[{P, T, D, Z}] = [ {Profiles, Test, Deps, XrefRunner} ||
{profiles, Profiles} <- CONFIG,
{test, Test} <- Profiles,
{deps, Deps} <- Test,
{xref_runner, XrefRunner} <- Deps],
{git, Url, _} = Z,
{ok, Br} = rebar_utils:sh("git rev-parse --abbrev-ref HEAD", []),
Branch = lists:subtract(Br, "\n"),
Z1 = {git, Url, {branch, Branch}},
D1 = lists:keystore(xref_runner, 1, D, {xref_runner, Z1}),
T1 = lists:keystore(deps, 1, T, {deps, D1}),
P1 = lists:keystore(test, 1, P, {test, T1}),
lists:keystore(profiles, 1, CONFIG, {profiles, P1}).