mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 03:00:17 +00:00
Prefer edoc-info as determining file; overview-summary.html may not
always be generated
This commit is contained in:
parent
81112cbd07
commit
2f0e545ce0
1 changed files with 5 additions and 5 deletions
|
@ -56,14 +56,14 @@ doc(Config, File) ->
|
||||||
{ok, AppName, _AppData} = rebar_app_utils:load_app_file(File),
|
{ok, AppName, _AppData} = rebar_app_utils:load_app_file(File),
|
||||||
|
|
||||||
%% Determine the age of the summary file
|
%% Determine the age of the summary file
|
||||||
SummaryFilename = filename:join(proplists:get_value(dir, EDocOpts, "doc"),
|
EDocInfoName = filename:join(proplists:get_value(dir, EDocOpts, "doc"),
|
||||||
"overview-summary.html"),
|
"edoc-info"),
|
||||||
SummaryLastMod = filelib:last_modified(SummaryFilename),
|
EDocInfoLastMod = filelib:last_modified(EDocInfoName),
|
||||||
|
|
||||||
%% For each source directory, look for a more recent file than
|
%% For each source directory, look for a more recent file than
|
||||||
%% SumaryLastMod; in that case, we go ahead and do a full regen
|
%% SumaryLastMod; in that case, we go ahead and do a full regen
|
||||||
NeedsRegen = newer_file_exists(proplists:get_value(source_path, EDocOpts, ["src"]),
|
NeedsRegen = newer_file_exists(proplists:get_value(source_path, EDocOpts, ["src"]),
|
||||||
SummaryLastMod),
|
EDocInfoLastMod),
|
||||||
|
|
||||||
case NeedsRegen of
|
case NeedsRegen of
|
||||||
true ->
|
true ->
|
||||||
|
@ -98,7 +98,7 @@ newer_file_exists(Paths, LastMod) ->
|
||||||
FLast = filelib:last_modified(Filename),
|
FLast = filelib:last_modified(Filename),
|
||||||
case FLast > LastMod of
|
case FLast > LastMod of
|
||||||
true ->
|
true ->
|
||||||
?DEBUG("~p is more recent than overview-summary.html: ~120p > ~120p\n",
|
?DEBUG("~p is more recent than edoc-info: ~120p > ~120p\n",
|
||||||
[Filename, FLast, LastMod]),
|
[Filename, FLast, LastMod]),
|
||||||
throw(newer_file_exists);
|
throw(newer_file_exists);
|
||||||
false ->
|
false ->
|
||||||
|
|
Loading…
Reference in a new issue