Current section

Files

Jump to
jwt rebar.config.script
Raw

rebar.config.script

IsRebar3OrMix = case application:get_env(rebar, vsn) of
{ok, VSN} ->
[Major|_] = string:tokens(VSN, "."),
(list_to_integer(Major) >= 3);
undefined ->
%% mix is used?
lists:keymember(mix, 1, application:loaded_applications())
end,
GitDeps =
[ {base64url, ".*", {git, "https://github.com/dvv/base64url", {tag, "v1.0"}}}
, {jsx, ".*", {git, "https://github.com/talentdeficit/jsx", {tag, "2.8.0"}}}
],
case IsRebar3OrMix of
true -> CONFIG;
_ -> lists:keyreplace(deps, 1, CONFIG, {deps, GitDeps})
end.