Current section
Files
Jump to
Current section
Files
bookish_spork
rebar.config.script
rebar.config.script
%% Add logo and year to Copyright
LogoBin = case file:read_file("logo.svg") of
{ok, Bin} ->
Bin;
_ ->
<<>>
end,
{{Year, _, _}, _} = calendar:universal_time(),
EdocOpts0 = proplists:get_value(edoc_opts, CONFIG),
EdocOpts1 = [
{def, {logo, binary_to_list(LogoBin)}} | [
{def, {years, "2018-" ++ integer_to_list(Year)}} |
EdocOpts0
]],
Config = lists:keyreplace(edoc_opts, 1, CONFIG, {edoc_opts, EdocOpts1}),
%% Add version number for edoc
case os:cmd("git tag | tail -1") of
[$v | Version0] ->
Version = string:trim(Version0, both, "\n"),
EdocOpts2 = [{def, {version, Version}} | EdocOpts1],
lists:keyreplace(edoc_opts, 1, Config, {edoc_opts, EdocOpts2});
_ ->
Config
end.