Well, it looks like file::up-to-date falls quite short
of the functionality that uptodatefile provided.
The file::up-to-date function should probably be
extended to create:
file::up-to-date-to-fileset(srcFile,
targetFileSetRefId)
file::fileset-up-to-date(srcFileSetRefId,
targetFile)
file::fileset-up-to-date-to-fileset(srcFileSetRefId,
targetFileSetRefId)
Then your code would change similar
to:
<fileset id="compareset">
<xsl:for-each select="...">
<!-- Same xsl tree from
<comparefiles> element previously -->
</xsl:for-each>
</fileset>
<property name="build.required" value="false"
if="${file::up-to-date-to-fileset(assembly.name +
'.version', 'compareset')}" />
If NAnt
functions support overloading, and named filesets could be referenced directly
in functions, then the file::up-to-date function could just be
overloaded:
file::up-to-date(string srcFile, string
targetFile)
file::up-to-date(string srcFile, FileSet
targetFileSet)
file::up-to-date(FileSet srcFileSet, string
targetFile)
file::up-to-date(FileSet srcFileSet, FileSet targetFileSet)
and the test would become something like
if="${file::up-to-date(assembly.name + '.version', @compareset)}". I
haven't looked at the source code for how functions and their arguments are
parsed, so I don't know how hard this last would be (Or even if it's already
implemented!)
It's
probably worth putting in a RFE at http://sourceforge.net/tracker/?group_id=31650&atid=402871 to
extend the file::up-to-date function unless someone mentions that it's already
been done. Until then, I guess you get to live with a deprecation warning
:-)
All the
best,
--
Troy
|
Title: Message
- [Nant-users] XSLT Generated Build File and deprecated upto... Bonnett, Evan A
- RE: [Nant-users] XSLT Generated Build File and deprec... Troy Laurin
- RE: [Nant-users] XSLT Generated Build File and deprec... Nick Zigomanis
- RE: [Nant-users] XSLT Generated Build File and deprec... Troy Laurin
- Re: [Nant-users] XSLT Generated Build File and de... Gert Driesen