Skip to content

Commit 2719b3c

Browse files
Make rebar3_archive_plugin conditional on rebar3 (#112)
* Make it work with rebar2: Make the rebar3_archive_code plugin included only for rebar3. * Include the right path to the tests: It looks like ./rebar3 eunit is broken in the master branch. Somehow it does not compile the tests. Had to edit the rebar.config and provide a path to the unit tests.
1 parent e40e92d commit 2719b3c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

rebar.config

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@
4343
{top_level_readme,
4444
{"./README.md",
4545
"https://github.com/deadtrickster/prometheus.erl"}}]}]},
46-
{test, [{plugins, [{coveralls, "1.4.0"},
46+
{test, [
47+
{eunit_compile_opts, [{src_dirs, ["src", "test/eunit"]}]},
48+
{plugins, [{coveralls, "1.4.0"},
4749
{rebar3_elvis_plugin, "0.0.4"}]}]},
4850
{gpb, [{plugins, [{rebar3_gpb_plugin, "2.7.0"}]},
4951
{provider_hooks, [{pre, [{compile, {protobuf, compile}}]},
@@ -56,4 +58,3 @@
5658
{deps, [{'erlang-color',
5759
{git, "https://github.com/julianduque/erlang-color", {branch, "master"}}}]}]}]}.
5860

59-
{plugins, [{rebar3_archive_plugin, "0.0.1"}]}.

rebar.config.script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ end,
88

99
case erlang:function_exported(rebar3, main, 1) of
1010
true -> % rebar3
11-
TravisConfig;
11+
lists:keystore(plugins, 1, TravisConfig, {plugins, [{rebar3_archive_plugin, "0.0.1"}]});
1212
false -> % rebar 2.x or older
1313
lists:keystore(proto_opts, 1, TravisConfig, {proto_opts, [{src_dirs, []}]})
1414
end.

0 commit comments

Comments
 (0)