Jens A. Koch

Subversion Tasks of Phing buildfile

The article shows some Subversion tasks of a Phing buildfile.
These tasks might be useful for those still working with SVN.

The tasks (1) “checking out” and (2) “updating”, deal both with a local SVN repository.

The tasks “exporting” an external (3) or local (4) repository have the purpose of getting a clean build directory without any “.svn” stuff.

The task “update repo and do local export” (5) is good for cronjob inclusion. Imagine that the next steps would be “compile” and “zip/tar.gz”.

The task “svn-lastrevision” is for fetching the revision number. You might use it for appending the product version (v1.2.3-#123).

There is also a task called “mrproper-svn-dir” – now, guess what?
Yes, it removes the export dirs for a fresh start.

Have a look and feel free to reuse. Regards, J

List of Subversion Commands
---------------------------

1 - svn-update : updates ${svn.local.directory} via svn update
2 - svn-checkout : svn checkout from ${svn.repository}
3 - svn-export-from-extern: svn export from ${svn.repository}
4 - svn-export-from-local : svn export from ${svn.local.directory}
5 - svn-up-export-local : svn-update + svn-export-from-local

Comments Off on Subversion Tasks of Phing buildfile

Comments are closed.