More cleaner way to keep compatibility with rebar 2.x

This commit is contained in:
UENISHI Kota 2016-03-11 01:21:02 +09:00
parent 0ffd66b1e6
commit ce2488c36a
4 changed files with 7 additions and 18 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ deps
*.so
_build
.rebar3
.rebar

View File

@ -17,7 +17,7 @@ xref:
@$(REBAR) xref
test:
@$(REBAR) eunit
@$(REBAR) as test eunit eqc
clean:
@$(REBAR) clean
@ -25,10 +25,7 @@ clean:
dialyzer:
@$(REBAR) dialyzer
check-all:
@$(REBAR) eunit
@$(REBAR) xref
@$(REBAR) dialyzer
check-all: test xref dialyzer
crosslang:
@echo "do ERL_LIBS=../ before you make crosslang or fail"

View File

@ -13,10 +13,10 @@
"src/msgpack_ext.erl"
]}.
{plugins, [
rebar3_eqc,
rebar3_hex
]}.
{profiles,
[{test,
[{plugins, [rebar3_eqc]}]
}]}.
%% {port_sources, ["c_src/*.c"]}.
%% {port_env, [

View File

@ -1,9 +0,0 @@
case application:get_key(rebar, vsn) of
{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.