After the build, I need to modify the HTML file that tells the client to download a new application.
I am looking for a token; replace it with the link and token:
<replace file="index.html" >
<replacetoken>${MyTOKEN}</replacetoken>
<replacevalue>"some link" <br> ${MyTOKEN}</replacevalue>
</replace>
This code CANNOT be moved to the script template assembly, because the tags replacetokenalso replacevaluetreat the text as literals - they are not expandpropertiesin my version of ANT.
I would like to use properties to determine the values of "some link"and MyTOKEN.
A workaround for using the properties in "some link"is to use filterchainand copy the file after replacing:
<copy file="index.html" tofile="index2.html" >
<filterchain>
<expandproperties />
</filterchain>
</copy>
But this works AFTER replace, so this means that I still need to hardcode the values MyTOKENdirectly in the build script.
:. replace, copy, filterreader filterchain? , .
: <replacetoken> <replacevalue>, , .
token value, .
${line.separator} . . Echo Task.
, ( ) ANT : ANT .