From e434d5a123466a29ed0fece63dcd79f1ef3b0784 Mon Sep 17 00:00:00 2001 From: UENISHI Kota Date: Tue, 8 Mar 2016 10:23:12 +0900 Subject: [PATCH] Remove rebar3_eqc when using rebar 2.x --- rebar.config | 5 +++++ rebar.config.script | 11 +++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/rebar.config b/rebar.config index 11c6956..64281d6 100644 --- a/rebar.config +++ b/rebar.config @@ -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 diff --git a/rebar.config.script b/rebar.config.script index 3cdfe48..abbbbdb 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -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.