mirror of
https://github.com/correl/rebar.git
synced 2024-11-27 11:09:55 +00:00
Revert "Merge pull request #171 from fenollp/using-stdlib"
This reverts commit3297ffec2c
, reversing changes made to0401debb3c
.
This commit is contained in:
parent
07e2232847
commit
6a4d80e385
2 changed files with 12 additions and 10 deletions
1
THANKS
1
THANKS
|
@ -125,4 +125,3 @@ YeJun Su
|
||||||
Yuki Ito
|
Yuki Ito
|
||||||
alisdair sullivan
|
alisdair sullivan
|
||||||
Alexander Verbitsky
|
Alexander Verbitsky
|
||||||
Pierre Fenoll
|
|
||||||
|
|
|
@ -119,7 +119,8 @@ clean(Config, _AppFile) ->
|
||||||
|
|
||||||
YrlFiles = rebar_utils:find_files("src", "^.*\\.[x|y]rl\$"),
|
YrlFiles = rebar_utils:find_files("src", "^.*\\.[x|y]rl\$"),
|
||||||
rebar_file_utils:delete_each(
|
rebar_file_utils:delete_each(
|
||||||
[re:replace(F, "\\.[xy]rl$", ".erl", [{return,list}]) || F <- YrlFiles]),
|
[ binary_to_list(iolist_to_binary(re:replace(F, "\\.[x|y]rl$", ".erl")))
|
||||||
|
|| F <- YrlFiles ]),
|
||||||
|
|
||||||
%% Delete the build graph, if any
|
%% Delete the build graph, if any
|
||||||
rebar_file_utils:rm_rf(erlcinfo_file(Config)),
|
rebar_file_utils:rm_rf(erlcinfo_file(Config)),
|
||||||
|
@ -148,9 +149,11 @@ test_compile(Config, Cmd, OutDir) ->
|
||||||
%% in src but in a subdirectory of src. Cover only looks in cwd and ../src
|
%% in src but in a subdirectory of src. Cover only looks in cwd and ../src
|
||||||
%% for source files. Also copy files from src_dirs.
|
%% for source files. Also copy files from src_dirs.
|
||||||
SrcDirs = rebar_utils:src_dirs(proplists:append_values(src_dirs, ErlOpts1)),
|
SrcDirs = rebar_utils:src_dirs(proplists:append_values(src_dirs, ErlOpts1)),
|
||||||
SrcErls = lists:flatmap(
|
SrcErls = lists:foldl(
|
||||||
fun (Dir) -> rebar_utils:find_files(Dir, ".*\\.erl$") end,
|
fun(Dir, Acc) ->
|
||||||
SrcDirs),
|
Files = rebar_utils:find_files(Dir, ".*\\.erl\$"),
|
||||||
|
lists:append(Acc, Files)
|
||||||
|
end, [], SrcDirs),
|
||||||
|
|
||||||
%% If it is not the first time rebar eunit or rebar qc is executed,
|
%% If it is not the first time rebar eunit or rebar qc is executed,
|
||||||
%% there will be source files already present in OutDir. Since some
|
%% there will be source files already present in OutDir. Since some
|
||||||
|
@ -161,17 +164,17 @@ test_compile(Config, Cmd, OutDir) ->
|
||||||
%% rebar_file_utils:cp_r.
|
%% rebar_file_utils:cp_r.
|
||||||
|
|
||||||
%% Get the full path to a file that was previously copied in OutDir
|
%% Get the full path to a file that was previously copied in OutDir
|
||||||
ToCleanUp = fun(F) ->
|
ToCleanUp = fun(F, Acc) ->
|
||||||
F2 = filename:basename(F),
|
F2 = filename:basename(F),
|
||||||
F3 = filename:join([OutDir, F2]),
|
F3 = filename:join([OutDir, F2]),
|
||||||
case filelib:is_regular(F3) of
|
case filelib:is_regular(F3) of
|
||||||
true -> F3;
|
true -> [F3|Acc];
|
||||||
false -> []
|
false -> Acc
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
ok = rebar_file_utils:delete_each(lists:flatmap(ToCleanUp, TestErls)),
|
ok = rebar_file_utils:delete_each(lists:foldl(ToCleanUp, [], TestErls)),
|
||||||
ok = rebar_file_utils:delete_each(lists:flatmap(ToCleanUp, SrcErls)),
|
ok = rebar_file_utils:delete_each(lists:foldl(ToCleanUp, [], SrcErls)),
|
||||||
|
|
||||||
ok = rebar_file_utils:cp_r(SrcErls ++ TestErls, OutDir),
|
ok = rebar_file_utils:cp_r(SrcErls ++ TestErls, OutDir),
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue