Simon Thorogood schrieb: > Hi - can anybody point me to a good online resource with samples of using the > nantcontrib svn, svn-checkout etc. tasks to implement a continuous build > using a subversion repository. > > The nantcontrib docs on this subject are rather brief.
Well, I used (for quicke some time) NAnt to do automatic update/builds of a project that was hosted in a subversion repository. Attached you'll find my svn.build file I used to get the lastest code from the repository. I also store the latest revision number in a property called "svn.revision", so I can create a zip file containing the latest build, whose name contains the revision. This way I can keep track of previous builds.
<?xml version="1.0" encoding="utf-8" ?> <project xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd"> <target name="svnlog" description="get the changelog and the latest revision number"> <exec program="svn.exe" commandline='log --xml --limit 1' output="_revision.xml" /> <xmlpeek file="_revision.xml" xpath="/log/logentry/@revision" property="svn.revision"/> <echo message="Using Subversion revision number: ${svn.revision}"/> <delete file="_revision.xml" /> <exec program="svn.exe" commandline="log" output="history.txt" /> </target> <target name="svnupdate"> <svn-update uri="svn://xxx.yyy.zzz/myproject/framework/trunk" /> </target> <include buildfile="default.build" /> </project>