You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by KrustyDerClown <Kr...@gmx.de> on 2005/07/11 18:44:32 UTC

CVS Tag with ANT or CruiseControl

Hello,

i have this little ANT target:

<target name="tag">
    <cvs cvsRoot="${cvs.root}" command="rtag" dest="${cvs.dir}" failonerror="yes">
        <commandline>
            <argument line="RelXX ${module}"/>
      </commandline>
     </cvs> 
</target

Is there an easy solution to increase the tag ?

For example ... from "Rel16" to "Rel17". I think its not so esay, because i must first know the old tag from CVS and then increase the number. And the number is just a part of the tag.

I use also CruiseControl ... maybe its easier that CruiseControl control the tag "text" (RelXX) and save this in a XML file ... and i take the tag from this xml file in ANT.

What do you mean ? What is the easiest way ?

Thank you in advance for your reply.

Greets Michael

Re: CVS Tag with ANT or CruiseControl

Posted by Ivan Ivanov <ra...@yahoo.com>.
Michael,

--- KrustyDerClown <Kr...@gmx.de> wrote:

> Hello,
> 
> i have this little ANT target:
> 
> <target name="tag">
>     <cvs cvsRoot="${cvs.root}" command="rtag"
> dest="${cvs.dir}" failonerror="yes">
>         <commandline>
>             <argument line="RelXX ${module}"/>
>       </commandline>
>      </cvs> 
> </target
> 
> Is there an easy solution to increase the tag ?
You can increase the tag by using javascript (or other
scripting language):
<project>
    <scriptdef name="inctag" language="javascript">
        <attribute name="tag"/>
        <attribute name="property"/>
        <![CDATA[
            tag = attributes.get("tag");
            number = tag.substring(3, tag.length());
            number++;
            inctag = "Rel" + number;
           
project.setNewProperty(attributes.get("property"),
                inctag);
        ]]>
    </scriptdef>
    <inctag tag="Rel17" property="inctag"/>
    <echo>$${inctag} = ${inctag}</echo>
</project>

> 
> For example ... from "Rel16" to "Rel17". I think its
> not so esay, because i must first know the old tag
> from CVS and then increase the number. 
Retrieving the old tag is a problem. You can make CVS
produce a list of all tags applied to the module, but
the question is how you will determine which one is
the old one. By the way, why do you want to do this?

HTH
Ivan

> And the number is just a part of the tag.
> 
> I use also CruiseControl ... maybe its easier that
> CruiseControl control the tag "text" (RelXX) and
> save this in a XML file ... and i take the tag from
> this xml file in ANT.
> 
> What do you mean ? What is the easiest way ?
> 
> Thank you in advance for your reply.
> 
> Greets Michael



		
____________________________________________________
Sell on Yahoo! Auctions – no fees. Bid on great items.  
http://auctions.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: CVS Tag with ANT or CruiseControl

Posted by RP...@360commerce.com.
Look into the buildnumber tag and try to tie your buildnumber to your tag. 
ant-contrib has a Math tag for handling the arithmetic. 

Or just keep a tag.properties file in your source.

>From an SCM point-of-view, you should tell CVS what you want, not the 
other way around.

Robert





"KrustyDerClown" <Kr...@gmx.de> 
07/11/2005 11:44 AM
Please respond to
"Ant Users List" <us...@ant.apache.org>


To
<us...@ant.apache.org>
cc

Subject
CVS Tag with ANT or CruiseControl






Hello,

i have this little ANT target:

<target name="tag">
    <cvs cvsRoot="${cvs.root}" command="rtag" dest="${cvs.dir}" 
failonerror="yes">
        <commandline>
            <argument line="RelXX ${module}"/>
      </commandline>
     </cvs> 
</target

Is there an easy solution to increase the tag ?

For example ... from "Rel16" to "Rel17". I think its not so esay, because 
i must first know the old tag from CVS and then increase the number. And 
the number is just a part of the tag.

I use also CruiseControl ... maybe its easier that CruiseControl control 
the tag "text" (RelXX) and save this in a XML file ... and i take the tag 
from this xml file in ANT.

What do you mean ? What is the easiest way ?

Thank you in advance for your reply.

Greets Michael