ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Weintraub" <qazw...@gmail.com>
Subject Re: Ant and Subversion
Date Tue, 29 Jan 2008 18:48:51 GMT
Just to make things clear here, you normally do not "tag" your daily
builds in Subversion. Instead, you simply use the source archive's
revision number to refer to the build. This is like an automatic tag.

Now, getting back to Subversion and Ant. The Subversion tasks have
been removed from Ant. Instead, these tasks are now part of a separate
AntLib that you would include in your Ant installation. I just
checked, and although Subversion is suppose to have an AntLib, nothing
has been released.

However, the subclipse team has developed a set of Subversion ant
tasks. You can find those at: http://subclipse.tigris.org/svnant.html.
To find the revision number of your archive, which you can use as a
revision number, you can do this:

<svn>
    <status path="." revisionProperty="build.number"/>
</svn>

When this completes, the ${build.number} will equal the revision of
the source archive.

If you want a separate build number that is independent of
Subversion's source archive revision number, you can use the
<buildnumber> task. This stores a build number in a file (called
build.number by default). Every time you execute the <buildnumber>
task, it increments the build number in that file. You can read in
that build number using the <property file> task:

<buildnumber/>
<property file="build.number"/>
<echo message="The build number is ${build.number}"/>

You make a tag in Subversion by doing a copy to the TAG directory:

<svn>
    <copy srcPath="${project.root}"
        destUrl="${svn.root.url}/TAGS/${tag.name}"
        message="${commit.message}"/>
</svn>

On Jan 29, 2008 10:45 AM, jpyork <jp_york@hotmail.com> wrote:
>
> Is it possible to create a task that creates a tag every time you do a build?
> --
> View this message in context: http://www.nabble.com/Ant-and-Subversion-tp15162188p15162188.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
--
David Weintraub
qazwart@gmail.com

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


Mime
View raw message