I have a file ga-code.txt
which contains analytics code.
I want to use phing
in a build to replace this token @ga-code@
in index.php
with the contents of ga-code.txt
Is this possible with phing
?
I have a file ga-code.txt
which contains analytics code.
I want to use phing
in a build to replace this token @ga-code@
in index.php
with the contents of ga-code.txt
Is this possible with phing
?
Yes, I can do it with Phing's replacetokenswithfile
The following would replace html comment <!--@@ga-code@@-->
with the contents of a file named ga-code.txt
<replacetokenswithfile begintoken="<!--@@" endtoken="@@-->" dir="${builddir}/production/" postfix=".txt" translatehtml="false" />