Permalink
Browse files

Update to support latest version of rebar

  • Loading branch information...
1 parent 6e437d1 commit cbcd0f36abf42cdab5ddd73e52765cf7090d8549 @hyperthunk committed Oct 22, 2011
@@ -6,7 +6,7 @@
{git, "../../../", "master"}}
]}.
-{rebar_plugins, [rebar_dist_plugin]}.
+{plugins, [rebar_dist_plugin]}.
{dist, [
{format, tar},
@@ -3,7 +3,7 @@
{rebar_dist_plugin, ".*"}
]}.
-{rebar_plugins, [rebar_foo_plugin, rebar_dist_plugin]}.
+{plugins, [rebar_foo_plugin, rebar_dist_plugin]}.
{dist, [
{config, "dist.config"},
@@ -1,6 +1,6 @@
%% Sample rebar.config demonstrating dist plugin configuration
-{rebar_plugins, [rebar_dist_plugin]}.
+{plugins, [rebar_dist_plugin]}.
{deps, [
{rebar_dist_plugin, ".*"}
@@ -5,7 +5,7 @@
{rebar_dist_plugin, ".*"}
]}.
-{rebar_plugins, [rebar_dist_plugin]}.
+{plugins, [rebar_dist_plugin]}.
{dist, [
{attach, [clean]},
@@ -4,7 +4,7 @@
{git, "../../../../../", "master"}}
]}.
-{rebar_plugins, [rebar_foo_plugin, rebar_dist_plugin]}.
+{plugins, [rebar_foo_plugin, rebar_dist_plugin]}.
{dist, [
{config, "dist.config"},
@@ -15,9 +15,9 @@ run(_Dir) ->
_ ->
""
end,
- ?assertMatch({ok, _}, retest:sh("rebar get-deps compile-deps " ++ Verbose,
+ ?assertMatch({ok, _}, retest:sh("rebar get-deps clean compile " ++ Verbose,
[{dir, "external-config"}])),
- ?assertMatch({ok, _}, retest:sh("rebar cl comp dist " ++ Verbose,
+ ?assertMatch({ok, _}, retest:sh("rebar dist " ++ Verbose,
[{dir, "external-config"}])),
?assertMatch({ok, _}, retest:sh("tar -zxf foo-1.2.3.tar.gz",
[{dir, "external-config/dist"}])),
@@ -6,7 +6,7 @@
{git, "../../../../../", "master"}}
]}.
-{rebar_plugins, [rebar_dist_plugin]}.
+{plugins, [rebar_dist_plugin]}.
{plugin_dir, "../../src"}.
{dist, [
@@ -18,10 +18,10 @@ run(_Dir) ->
end,
?assertMatch({ok, _}, retest:sh("rebar get-deps " ++ Verbose,
[{dir, "release-tarball"}])),
- ?assertMatch({ok, _}, retest:sh("rebar compile-deps " ++ Verbose,
+ ?assertMatch({ok, _}, retest:sh("rebar clean compile " ++ Verbose,
[{dir, "release-tarball"}])),
%% check that the {attach, [generate]} hook is working...
- ?assertMatch({ok, _}, retest:sh("rebar cl comp generate",
+ ?assertMatch({ok, _}, retest:sh("rebar generate",
[{dir, "release-tarball"}])),
%?assertMatch({ok, _}, retest:sh("rebar dist " ++ Verbose,
@@ -6,7 +6,7 @@
{git, "../../../../../", "master"}}
]}.
-{rebar_plugins, [rebar_dist_plugin]}.
+{plugins, [rebar_dist_plugin]}.
%% {plugin_dir, "../../src"}.
@@ -3,10 +3,10 @@
{deps, [
{rebar_dist_plugin, ".*",
- {git, "../../../../../", "master"}}
+ {git, "../../../../", "master"}}
]}.
-{rebar_plugins, [rebar_dist_plugin]}.
+{plugins, [rebar_dist_plugin]}.
{plugin_dir, "../../src"}.
{dist, [
View
@@ -5,9 +5,17 @@
-include_lib("eunit/include/eunit.hrl").
files() ->
- [{copy,
- "../../examples/project-zip", "project-zip"},
- {copy, "rebar.config", "project-zip/rebar.config"}].
+ [{copy,
+ "../../rebar", "rebar"},
+ {copy,
+ "../../examples/project-zip/ebin", "ebin"},
+ {copy,
+ "../../examples/project-zip/include", "include"},
+ {copy,
+ "../../examples/project-zip/priv", "priv"},
+ {copy,
+ "../../examples/project-zip/src", "src"},
+ {copy, "rebar.config", "rebar.config"}].
run(_Dir) ->
Verbose = case rebar_config:is_verbose() of
@@ -16,16 +24,11 @@ run(_Dir) ->
_ ->
""
end,
- ?assertMatch({ok, _}, retest:sh("rebar get-deps " ++ Verbose,
- [{dir, "project-zip"}])),
- ?assertMatch({ok, _}, retest:sh("rebar compile-deps " ++ Verbose,
- [{dir, "project-zip"}])),
- ?assertMatch({ok, _}, retest:sh("rebar cl comp generate",
- [{dir, "project-zip"}])),
- ?assertMatch({ok, _}, retest:sh("rebar dist " ++ Verbose,
- [{dir, "project-zip"}])),
- ?assertMatch({ok, _}, retest:sh("unzip myproject-1.zip",
- [{dir, "project-zip/dist"}])),
+ ?assertMatch({ok, _}, retest:sh("./rebar get-deps " ++ Verbose, [])),
+ % ?assertMatch({ok, _}, retest:sh("./rebar compile-deps " ++ Verbose, [])),
+ ?assertMatch({ok, _}, retest:sh("./rebar cl comp", [])),
+ ?assertMatch({ok, _}, retest:sh("./rebar dist " ++ Verbose, [])),
+ ?assertMatch({ok, _}, retest:sh("unzip myproject-1.zip", [{dir, "dist"}])),
?assert(exists("myproject/ebin/myproject.app")),
?assert(exists("myproject/ebin/myproject_app.beam")),
?assert(exists("myproject/ebin/myproject_sup.beam")),
@@ -38,4 +41,4 @@ exists(F) ->
filelib:is_regular(expected_file(F)).
expected_file(Path) ->
- filename:join("project-zip/dist", Path).
+ filename:join("dist", Path).
View
BIN rebar
Binary file not shown.
View
@@ -11,7 +11,7 @@
warnings_as_errors]}.
%% ReTest config
-{rebar_plugins, [rebar_retest_plugin]}.
+{plugins, [rebar_retest_plugin]}.
{retest_testdir, "inttest"}.
{retest_verbose, true}.
{retest_loglevel, debug}.

0 comments on commit cbcd0f3

Please sign in to comment.