开发者

ant script to remove svn:ignored directories & files

We use svn:ingored to mask out externally sourced files (aka compiled or copied) from our projects. Is there a way to remove just those files and d开发者_JS百科irectories as part of an ant cleanup target?


Never used svnant, but from the documentation it seems they provide some selectors, a svnIgnored selector f.e.,
so in theory it should work like that :

 <delete>
  <fileset dir="workingcopy">
   <svnIgnored/>
  </fileset>
 </delete>


I recommend having a clean target that gets rid of those, It will work in all cases and even if you get the source by doing an svn export. And it's very clear from looking at the build script what's being deleted. It will also still work if your team moves to [insert new SCM system here].

<target name="clean">
    <delete dir="${build.dir}" />
    <delete dir="${dist.dir}" />
    <delete dir="${reports.dir}" />
</target>

<target name="init" depends="clean">
    <mkdir dir="${build.dir}" />
    <mkdir dir="${dist.dir}" />
    <mkdir dir="${reports.dir}" />
</target>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜