[英]Update an SVN folder using ant script
假设我已经签出了BuildI12
文件夹中的一个文件夹,而我想使用ant来更新它,我该怎么做。
我不会在ant中创建自定义任务。
如果我理解您的需求,并且您的意思是从自定义ant任务运行SVN UPDATE,则可以执行以下操作:
<target name="svn_command" description = "run svn update command">
<if> <os family="windows"/>
<then>
<exec dir="." executable="cmd.exe" outputproperty="svnlog.out" failonerror="true" >
<arg line="/c svn update"/>
</exec>
</then>
<else>
<exec executable="svn" outputproperty="svnlog.out">
<arg line=" update"/>
</exec>
</else>
</if>
</target>
显然,使用占位符并创建可以用于不同SVN操作的动态任务,您可以做更多的技巧。
让我知道这是否适合您的需求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.