ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Castrianni <>
Subject RE: buildnumber Ant task & automated updates of ivy.xml
Date Wed, 19 Nov 2008 21:40:46 GMT
At first I was struggling with this wondering how am I going to get my CI tool to figure out
how to find out what the next version of the module should be by looking at the ivy repo and
performing the steps that the ivy buildnumber task would normally do.  Then I realized that
I didn't have to.  If the CI tool is the only thing that publishes to the official ivy repo,
then it can be in COMPLETE control of the version number and whatever mechanism the CI tool
uses is fine.  Therefore, it doesn't have to look at the ivy repo and figure out what the
next version number needs to be.  It knows what the last version number was since it generated
it, so it just bumps up the build number by one each time.  I use QuickBuild and my revision
number algorithm is:


which gets evaluated by QuickBuild to put in the releaseName, branch or tag name, and an ever
increasing buildnumber that gets +1 on every build.

This result gets stored in a QB variable called ${build.version} which I then assign to an
environment variable called BUILD_REVISION for the part that actually launches the ivy build
script.  My ivy build script just reads the BUILD_REVISION env variable and uses that for
publishing.  It is that simple.

Shawn Castrianni

-----Original Message-----
From: Mitch Gitman []
Sent: Wednesday, November 19, 2008 3:34 PM
Subject: Re: buildnumber Ant task & automated updates of ivy.xml

Quick replies inline.

On Wed, Nov 19, 2008 at 8:30 AM, Shawn Castrianni <> wrote:

> I started off using the buildnumber task to let IVY control the build
> number for CI, but then found it difficult to tell the CI tool what the
> version number was that IVY selected.  Obvioulsy, it is better if the
> version number used by CI matches the version used by IVY.  Therefore, I
> switched to NOT use the buildnumber task and let the CI tool choose the
> number and pass it to IVY as a environment variable or ant property that can
> be passed into the ant command line.  When developers do their own builds
> outside of the CI system, the buildnumber is hardcoded to "LOCAL".
Hmm, so how is your CI tool figuring out the build number so that it can
pass it to Ivy?

> As far as updating XML, the xmltask from oops consultancy is perfect.  I
> have been able to do everything I need for parsing and editing with that
> task.
I'll make sure to check this out some time. Thanks.

> ---
> Shawn Castrianni

This e-mail, including any attached files, may contain confidential and privileged information
for the sole use of the intended recipient.  Any review, use, distribution, or disclosure
by others is strictly prohibited.  If you are not the intended recipient (or authorized to
receive information for the intended recipient), please contact the sender by reply e-mail
and delete all copies of this message.
View raw message