views:

103

answers:

2

As part of my build process on my CruiseControl.net server, I want to take a backup of my svn repository and upload it to a remote server.

I figured that I can use the Package task in the publisher Section. I have created the following task:

  <package>
      <name>c:\...\svn.zip</name>
      <compression>9</compression>
      <always>true</always>
      <baseDirectory>C:\...\svn_repository_dir</baseDirectory>
      <files>
        <file>\*.*</file>
      </files>
  </package>

It creates the zip file with the files in the repository dir, but does not process the dir recursively.

Is that possible?

A: 

The appropriate zip switches are -r (for recursive) and, usefully, -x (to exclude the hidden SVN datafiles)

zip dest.zip -r path/* -x *.svn*

As for Cruise Control, does it work to put these switches into a <file> tag?

E.g.

<file>-r</file>
<file>\*.*</file>
<file>-x *.svn*</file>
Will
A: 

The doc on this is very sparse and doesn't really specify if you can use wildcards. I guess you could get the source code and see what this task does. One thing you might try is to assume that the element will except the same wildcards as other parts of cc.net do and use:

<file>**/*</file>

It's worth a try.

PilotBob