General
BuildMaster supports CVS and Subversion by loading the information and carrying out the commands. Since both system stores repository information on the working directory, you can load both driver by passing in the path to the working directory, wich is normally where your release script is.
In Ruby, you can find out the path of the directory which the current script is by File.dirname(__FILE__))
CVS
The following is a sample code with CVS.
require 'buildmaster' cvs = BuildMaster::CvsDriver.from_path(File.dirname(__FILE__)) # Now your can issue various command cvs.update cvs.update('-PAd') cvs.commit('commit comment') cvs.tag('tag-name') # ...
Subversion
BuildMaster gives you a bit more help as a Subversion driver. It assumes default layout of your subversion repository, i.e., trunk, tags and branches folder under the root. So when you create tag with Subverseion driver, you only need to tell it the name of the tag.
require 'buildmaster' svn = BuildMaster::SvnDriver.from_path(File.dirname(__FILE__)) puts 'committing before release' svn.commit('committing before release') tag = "buildmaster-#{SPEC.version}-b#{buildnumber.number}" puts "tagging with #{tag}" svn.tag(tag)