Search code examples
svntagsnantbuild-script

Can I tag in Apache Subversion with NAnt?


I need to build multiple environments and tag them in Apache Subversion using a NAnt script. Is there a way that I can use NAnt to create the tags in Apache Subversion with a variable I supply?


Solution

  • Yes. I haven't worked with nant myself, but given that there is an <exec> task, you should be able to use it to run the Subversion CLI client with something like:

    <exec program="svn" commandline='copy http://myserver/svn/trunk "http://myserver/svn/tags/${tag_name}"' />
    

    (I used this example as a model.)

    On Windows, I always install the Slik SVN binaries and add the installation's bin directory to my PATH.