#730 <tstamp> task "Pattern" not working

0.85
open
nobody
Tasks (408)
5
2010-04-13
2010-04-13
fmhome
No

Hi,

The following info seems to be misleading and has a bug, unless I am totally missing the logic here.

Example: (From NAnt doc)
Set the build.date property.

<tstamp property="build.date" pattern="yyyyMMdd" verbose="true" />

No matter what pattern you use. The task returns the same output as below...

Buildfile: file:///C:/test.build
Target framework: Microsoft .NET Framework 2.0

[tstamp] Tuesday, April 13, 2010 9:46:38 AM.

BUILD SUCCEEDED

Total time: 0 seconds.

Discussion

  • Ryan Boggs
    Ryan Boggs
    2010-04-14

    Works for me...

    <?xml version="1.0" ?>
    <project name="t_test" default="t_target">
    <target name="t_target">
    <tstamp property="build.date" pattern="yyyyMMdd" verbose="true" />
    </target>
    </project>

    Output:
    NAnt 0.90 (Build 0.90.3752.0; nightly; 4/10/2010)
    Copyright (C) 2001-2010 Gerry Shaw
    http://nant.sourceforge.net

    Buildfile: file:///C:/temp/t_test.build
    Target framework: Microsoft .NET Framework 3.5
    Target(s) specified: t_target

    t_target:

    [tstamp] Tuesday, April 13, 2010 5:47:58 PM.
    [tstamp] build.date = 20100413.

    BUILD SUCCEEDED

    Total time: 0 seconds.

     
  • fmhome
    fmhome
    2010-04-14

    Yes, it works for me as well :)

    But, what I was trying to say and IMO the actual task should not echo by default...everytime
    [tstamp] Tuesday, April 13, 2010 5:47:58 PM.

    and instead it should echo only
    [tstamp] build.date = 20100413

    in your example.

    The issue here is when you output the build log using NAnt.Core.XmlLogger,
    The timestamp is actually really doesn't make sense and it is hard to traverse through the log, if one is trying to parse the whole log and reading the info for some sort of report.

    It is not a big deal, but it would be cleaner that way. I hope I am able to convey my message across.

    Thanks again...