Title: RE: [Nant-users] Read file contents into nant property?

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
ERA Integrated Desking Development


-----Original Message-----
From: Sebastian [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 23, 2004 9:23 AM
To: [EMAIL PROTECTED]
Subject: [Nant-users] Read file contents into nant property?


Hello!

Is there a way to read the content of a file into an nant property?

Thanks in advance,

Sebastian

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297

_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to