ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eli Skoran <eli.sko...@telmap.com>
Subject question about tstamp
Date Mon, 29 Oct 2012 07:39:41 GMT
Hello.

I am using tstamp and I have a problem I did not find a solution for:
Here is a code sample:

<project name="XXX">
       <tstamp>
              <format property="date" pattern="dd_MM_yyyy" />
              <format property="time" pattern="HH_mm_ss" />
       </tstamp>

<property name = "version.name" value="VERSION_NAME_${date}_${time}" />
       <property name = "fullpath.tag.name" value="${svn.tags}/${version.name}" />

<target name="create.tag">
              <if>
                     <svnExists target="${fullpath.tag.name}"/>
                     <then>
                           <echo>SVN tag already exists: ${fullpath.tag.name}, reusing</echo>
                     </then>
              <else>
                     <echo>Creating new folder in SVN: ${fullpath.tag.name}</echo>
                     <svn username="${svn.username}" password="${svn.password}">
                           <mkdir url="${fullpath.tag.name}" message="tag: ${p.tag}" />
                     </svn>
                     <foreach param="module_name" target="tag.module" list="${svn.projects}"
parallel="false" maxthreads="10"  delimiter=";"/>
              </else></if>
       </target>

       <target name="tag.module">
              <echo message="tagging ${module_name}" />
              <echo>Copying from ${svn.root}/${module_name} to ${fullpath.tag.name}</echo>
              <svn username="${svn.username}" password="${svn.password}">
                     <copy srcUrl="${svn.root}/${module_name}" destUrl="${fullpath.tag.name}"
message="tag: ${version.name}" />
              </svn>
       </target>


The problem is that each time version.name is used (inside the forreach -> tag.module)
the timestamp is different, hence there is a new folder created in SVN.

How can I fix that?


Thanks.
Eli Skoran


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message