case erlang:function_exported(rebar3, main, 1) of
    true -> % rebar3
        CONFIG;
    false -> % rebar 2.x or older
        %% Rebuild deps, possibly including those that have been moved to
        %% profiles
        [{deps, [
            {hackney,       ".*", {git, "https://github.com/benoitc/hackney.git",     {tag, "1.6.5"}}},
            {jsx,           ".*", {git, "https://github.com/talentdeficit/jsx.git",   {tag, "v2.8.0"}}},
            {erlsom,        ".*", {git, "https://github.com/willemdj/erlsom.git",     {tag, "v1.4.1"}}},
            {mochiweb_util, ".*", {git, "https://github.com/kivra/mochiweb_util.git", {tag, "0.1.0"}}}
        ]} | [Config || {Key, _Value}=Config <- CONFIG, Key =/= deps]]
end.
