I had the same problem but Jarek sent me this solution. Try it out, adapt as needed. Hope this helps.
There's a trick that uses <foreach> task. Taken from my build script:
<target name="installer">
<foreach item="Line" in="version.txt" delim="."
property="sooda.major,sooda.minor,sooda.revision,sooda.build">
... do something with the properties ...
</foreach>
</target>
This will read ALL lines from "version.txt" (there's only one and that's the
trick) and set sooda.* properties appropriately.
See <foreach> task documentation for more info. Hope it helps.
Jarek
Evan A. Bonnett
Reynolds and Reynolds,
IT
-----Original Message-----
From:
Nicklas Norling [mailto:[EMAIL PROTECTED]
Sent: Wednesday,
March 31, 2004 8:19 AM
To:
[EMAIL PROTECTED]
Subject: [Nant-users] Setting a
property to output of executable
Hi.
I'm looking and looking and just can't find a way to set a property
to the value of output from a program. Or from the content of a file
or any other communicative and dynamic way.Does anyone have any tips in this area?
What I'm doing is running "svn -Nqu status" and what the revision
line in a property so I can use the property functions to trim it down
to only the number and later use that as information for the build.I can't communicate with files, I must have a property.
/Nicke