Title: Message
Cool, thanks.  I am setting the version #'s to "" globally to start with.  Then, I call an exe using the <exec> task.  That outputs the new version # to a txt file.  Using a <foreach>, I set the properties.  Here is the code.  Let me know what you think.  I am basing this off an example that Jarek provided.   I hope I am doing things right.
 
 
 <property name="version.major" value="" />
 <property name="version.minor" value="" />
 <property name="version.revision" value="" />
 <property name="version.build" value="" />
.
.
.
 <target name="label">
  <exec program="${versioning.prog}" commandline="AssemblyInfo.cs" output="${version.file}" /> 
  <foreach item="Line" in="${version.file}" delim="." property="major.temp,minor.temp,revision.temp,build.temp">
   <property name="version.major" value="${major.temp}" />
   <property name="version.minor" value="${minor.temp}" />
   <property name="version.revision" value="${revision.temp}" />
   <property name="version.release" value="${build.temp}" />   
  </foreach>
.
.
.
Label VSS files for the <vssget>
 </target>
 
Anyone see any problems?

Thanks,

Evan A. Bonnett
Reynolds and Reynolds, IT
ERA Integrated Desking Development
937-485-8577
58577

-----Original Message-----
From: Noel Gifford [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 10:40 PM
To: [EMAIL PROTECTED]
Subject: RE: [Nant-users] Getting Code from VSS via NAnt

Yes, you just use the <property> syntax.  Of course, the property will now be changed globally - not just in the target.

 

Noel

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Bonnett, Evan A
Sent: Thursday, March 18, 2004 2:31 PM
To: 'Jaroslaw Kowalski'; 'Morris, Jason'; [EMAIL PROTECTED]
Subject: RE: [Nant-users] Getting Code from VSS via NAnt

 

So, if I declare properties in the top of the build file for use by any target, what if I want to manipulate the property in a target?  What is the syntax to set a property value mid target if its already been declared?

Do I just use the <property>??

Evan A. Bonnett
Reynolds and Reynolds, IT

 

-----Original Message-----
From: Jaroslaw Kowalski [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 16, 2004 3:22 PM
To: Bonnett, Evan A; 'Morris, Jason'; [EMAIL PROTECTED]
Subject: Re: [Nant-users] Getting Code from VSS via NAnt

 

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