From ce2488c36aa2f7d9f2c5c670f009d851c0cfce07 Mon Sep 17 00:00:00 2001 From: UENISHI Kota Date: Fri, 11 Mar 2016 01:21:02 +0900 Subject: [PATCH] More cleaner way to keep compatibility with rebar 2.x --- .gitignore | 1 + Makefile | 7 ++----- rebar.config | 8 ++++---- rebar.config.script | 9 --------- 4 files changed, 7 insertions(+), 18 deletions(-) delete mode 100644 rebar.config.script diff --git a/.gitignore b/.gitignore index 75b64f6..9a3a791 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ deps *.so _build .rebar3 +.rebar diff --git a/Makefile b/Makefile index 0de831f..9b54564 100644 --- a/Makefile +++ b/Makefile @@ -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" diff --git a/rebar.config b/rebar.config index 64281d6..26a2fc6 100644 --- a/rebar.config +++ b/rebar.config @@ -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, [ diff --git a/rebar.config.script b/rebar.config.script deleted file mode 100644 index abbbbdb..0000000 --- a/rebar.config.script +++ /dev/null @@ -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.