Skip to content

Instantly share code, notes, and snippets.

@65
Created March 5, 2012 09:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 65/1977665 to your computer and use it in GitHub Desktop.
Save 65/1977665 to your computer and use it in GitHub Desktop.
svn update via ANT
<!-- Properties to be set by SVN $ID$ $REV$ -->
<project name="SVN Update" default="update" basedir=".">
<description> Updates to head revision </description>
<!-- all properties are in build.properties -->
<property file="build.properties" />
<!-- path to the svnant libraries. Usually they will be located in ANT_HOME/lib -->
<path id="svnant.classpath">
<fileset dir="${ant.home}">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- load the svn task -->
<typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath" />
<target name="updateserver">
<echo message="Automatic updater" />
<property name="svn.username" value="xxxxx" />
<property name="svn.password" value="xxxxx" />
<!-- update working copy to make sure -->
<echo message="updating working copy at ${svn.dev.wc}" />
<svn username="${svn.username}" password="${svn.password}">
<update dir="${svn.dev.wc}"/>
</svn>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment