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

----- Original Message ----- 
From: "Bonnett, Evan A" <[EMAIL PROTECTED]>
To: "'Morris, Jason'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, March 16, 2004 7:45 PM
Subject: RE: [Nant-users] Getting Code from VSS via NAnt


> Great.  But is there no way to get the value from a file and set a
property?
> If not, would that be a good candidate for a custom task?
>
> Evan A. Bonnett
> Reynolds and Reynolds, IT
> ERA Integrated Desking Development
> 937-485-8577
> 58577
>
> -----Original Message-----
> From: Morris, Jason [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 15, 2004 11:04 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [Nant-users] Getting Code from VSS via NAnt
>
>
> There is a nant task called  <asminfo> which should be able to do what you
> want.  Check out
>
> http://nant.sourceforge.net/help/tasks/asminfo.html
> <http://nant.sourceforge.net/help/tasks/asminfo.html>
>
>
>
>   _____
>
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Bonnett, Evan
A
> Sent: Monday, March 15, 2004 11:32 AM
> To: 'Price, Henry'; [EMAIL PROTECTED]
> Subject: RE: [Nant-users] Getting Code from VSS via NAnt
>
>
> All,
>
> What about versioning the assembly?  We use the standard Major, Minor,
> Build, Revision.  Is there a standard means of doing this, or one that is
> common?
>
> Thanks,
>
>
> Evan A. Bonnett
> Reynolds and Reynolds, IT
>
>
>  -----Original Message-----
> From: Price, Henry [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 15, 2004 11:44 AM
> To: Bonnett, Evan A; [EMAIL PROTECTED]
> Subject: RE: [Nant-users] Getting Code from VSS via NAnt
>
>
>
> Yes there is, but it's in the NAnt Contrib rather than the core (more info
> on NAntContrib can be found at:
http://sourceforge.net/projects/nantcontrib
> <http://sourceforge.net/projects/nantcontrib>  )
>
> http://nantcontrib.sourceforge.net/help/tasks/vssget.html
> <http://nantcontrib.sourceforge.net/help/tasks/vssget.html>
>
> Will fill you in on the <vssget> command,
>
> http://nantcontrib.sourceforge.net/help/tasks/
> <http://nantcontrib.sourceforge.net/help/tasks/>
>
> Will show you all tasks available in the NAnt Contrib (there are a load of
> other SourceSafe ones).
>
> As for the get task - I typically have it in a separate target
(<cvsUpdate>
> seeing as we're using CVS here) which is called before the build target.
As
> I divide each of the clean, build, deploy and test targets up into their
own
> scripts (each containing a whole pile of their own targets), that means it
> goes in the build target (as you would look at it).
>
> Hope that helps :)
>
> Henry
>
> -----Original Message-----
> From: Bonnett, Evan A [mailto:[EMAIL PROTECTED]
> Sent: 15 March 2004 4:09P
> To: [EMAIL PROTECTED]
> Subject: [Nant-users] Getting Code from VSS via NAnt
>
>
> Hi all,
>
> Is there support for VSS or do I need to call the <exec> task to run a
batch
> file?
>
> Is there a better way to get the latest from VSS?  Also, which target does
> this task really belong in?  I have the following targets now...
>
> clean - Deletes all files from the bin directory and recopies the dll's
from
> a given reference directory
> build - Compiles the code and outputs the resultant dll to the bin
directory
> package - zips up all the necessary files for the web app to be copied to
> the destination directory
> install - copies the zip over to the install directory and unzips
>
> I know I need a test target but I'm building my way to that as I am new to
> NAnt. Is it standard practice to put the source code extraction in one of
> the existing targets or it's own target?
>
> Thanks,
>
> Evan A. Bonnett
> Reynolds and Reynolds, IT
>
>
>
>
> "This communication is intended solely for the addressee and is
confidential
> and not for third party unauthorised distribution."
>
>
>



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to