> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > [EMAIL PROTECTED] > Sent: donderdag 17 maart 2005 15:48 > To: [email protected] > Subject: [Nant-users] Path changes in RC2 > > Hi, > > I have a bit of a problem. We currently use a nightly build > from 30-06-2004 > for building our system. I am looking at upgrading to RC2, > but have hit a > problem with the way directories are treated. Our build > script consists of > a top level build file invoked by a .bat file, this then uses > the <nant> > task to shell out build scripts for the actual components > etc. Under the old > build, if I called directory::get-current-directory(), then > it returned me > the folder for the currently executing build file, however > under RC2, it > returns the folder for the top level controlling script.
This is correct. Previously, both the directory::get-current-directory() as project::get-base-directory() returned the same information, as we always modified the current directory to the project base directory. The directory::get-current-directory() always returned the project base directory instead of the actual working directory (as documented). This was actually a bug which we fixed. Allowing build authors to access both the project base directory and the directory from which NAnt was launched, seems like a welcome addition. In your case, its an issue because you use a nightly build in which both functions are not available, but there are alternatives (see below). > I can get the folder in RC2 by using the > project::get-base-directory(), but > this function was not available in 30-06-20054 version. You can just use the "nant.project.basedir" property instead. Note that this property is deprecated in NAnt 0.85. Using the following two functions should also get you the same result : path::get-directory-name(project::get-buildfile-path()) > The > problem is I > cannot force all the user base to upgrade NAnt, so how can I > change my build > script to allow both methods? Is there a simple way to check > the version of > NAnt inside the script? What version of NAnt did this > functionality change > and why? It seems a strange change to make in some ways as I > would have > thought the original behavior was correct, and in the > interest of preserving > backward compatibility, wouldn't it have been better to add a > new method to > perform the new functionality rather than changing the > existing method and > adding a new one to provide the old functionality? We never released a (non-beta) version of NAnt with the old functionality. We do not guarantee backward compatibility with features introduced in betas, although we definitely want to avoid breaking changes. > > The old behavior seems to be used a lot internally too, as I > used to be able > to pass a relative path into tasks like <nunit> whereas now > it looks like > I'll have to create the full path inside the script to pass > in. This just > means more script to write and maintain. That should definitely not be correct. Can you send me a repro for this ? Gert ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Nant-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nant-users
