Build versioning with NAnt, Draco.NET and SourceGear Vault

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
intesoft
Posts: 1
Joined: Sat Oct 22, 2005 1:02 am
Contact:

Build versioning with NAnt, Draco.NET and SourceGear Vault

Post by intesoft » Sat Oct 22, 2005 1:10 am

I've created a custom NAnt function to retrieve the version number of a tree object from Vault for use in a version-build script outlined here (http://blogs.intesoft.net/simon/archive ... 21/39.aspx).

This is so it can be called and assigned to a property within NAnt (ie. I don't want any task to run, just a value returned which is wht it's a function and not a task):

Code: Select all

<property name="build.version.revision" value="${vault::getversion(vault.url, vault.repository, vault.path, vault.username, vault.password)}"/>
Basically, I use the version number that Vault maintains to be the version number for the build (it only increments when changes are made) and the build label ends up matching the version number in Vault.

I thought I'd share it in case anyone else finds it useful - I don't know what the procedure is for adding it to the Vault NAnt Tasks project (which I've done on my own copy)?

ian_sg
Posts: 787
Joined: Wed May 04, 2005 10:55 am
Location: SourceGear
Contact:

Post by ian_sg » Mon Oct 24, 2005 1:03 pm

Sounds cool. Probably the easiest way to make this happen would be to simply email me the code (using the email link below), and I'll make sure it gets put with the other Vault NAnt stuff.
Ian Olsen
SourceGear

Post Reply