Remove rebar3_eqc when using rebar 2.x

This commit is contained in:
UENISHI Kota 2016-03-08 10:23:12 +09:00
parent ba2f7f73e8
commit e434d5a123
2 changed files with 10 additions and 6 deletions

View File

@ -13,6 +13,11 @@
"src/msgpack_ext.erl"
]}.
{plugins, [
rebar3_eqc,
rebar3_hex
]}.
%% {port_sources, ["c_src/*.c"]}.
%% {port_env, [
%% %% Make sure to set -fPIC when compiling leveldb

View File

@ -1,10 +1,9 @@
case application:get_key(rebar, vsn) of
{ok, "3."++_} ->
PLUGINS = {plugins, [
{rebar3_eqc, ".*", {git, "https://github.com/kellymclaughlin/rebar3-eqc-plugin.git", {tag, "0.0.8"}}},
rebar3_hex
]},
lists:keystore(plugins, 1, CONFIG, PLUGINS);
{ok, "2."++_V} ->
%% Workarounds for rebar2 here
{plugins, Plugins} = lists:keyfind(plugins, 1, CONFIG),
NewPlugins = lists:delete(rebar3_eqc, Plugins),
lists:keyreplace(plugins, 1, CONFIG, {plugins, NewPlugins});
_ ->
CONFIG
end.