mirror of
https://github.com/correl/rebar.git
synced 2024-12-18 11:06:20 +00:00
Merge pull request #69 from maxlapshin/master
I've added variable expansion in replace overlay
This commit is contained in:
commit
ea8aca4519
1 changed files with 1 additions and 1 deletions
|
@ -341,7 +341,7 @@ execute_overlay([{replace, Out, Regex, Replacement, Opts} | Rest],
|
|||
Vars, BaseDir, TargetDir) ->
|
||||
Filename = rebar_templater:render(filename:join(TargetDir, Out), Vars),
|
||||
{ok, OrigData} = file:read_file(Filename),
|
||||
Data = re:replace(OrigData, Regex, Replacement,
|
||||
Data = re:replace(OrigData, Regex, rebar_templater:render(Replacement, Vars),
|
||||
[global, {return, binary}] ++ Opts),
|
||||
case file:write_file(Filename, Data) of
|
||||
ok ->
|
||||
|
|
Loading…
Reference in a new issue