I'm using the Ant LoadFile task to read the version from a file in the repository root.
<loadfile property="build.version" srcFile="VERSION"/>
The version file ends with a newline due to the tooling used to create and edit it. Ant is reading and using that newline as part of the property value. That's jamming me up when I use the value as a replacement for a file or output.
@build.version@ -> 99.0.0.0^M
Is there some way to strip that out of the property after loading or as part of the loadfile task?
I'm talking about this kind of Chomp.
The VERSION
file literally contains only the version number and a newline (line numbers are mine for illustration).
1. 99.0.0.0
2.