Jenkins pack delete all folder directories except 1

0

I have the directory structure so

  • $ {src.web.dir} / templates / assets_clients /
    • client1
    • client2
    • client3

I need to remove all internal folders including .svn minus the client3 folder and its files and directories (client3 is $ {env.PASTA_ASSETS})

my build.xml

<target name="pack" depends="config">

    <echo message="Retirando pastas de Clientes..." />

    <delete includeEmptyDirs="true" >
        <fileset dir="${src.web.dir}/templates/assets_clientes/" >
            <include name="**/*" />
            <exclude name="." />
            <exclude name="${env.PASTA_ASSETS}" />
        </fileset>
    </delete>

    <zip destfile="${nome.arquivo}">
        ....
    </zip>
</target>
    
asked by anonymous 27.02.2018 / 14:48

1 answer

0

The best way I could get it was this:

<delete includeEmptyDirs="true" >
        <fileset dir="${src.web.dir}/templates/assets_clientes" includes="**/*" defaultexcludes="false">
            <exclude name="**${env.PASTA_ASSETS}/**/*" />
        </fileset>
    </delete>

    <zip destfile="${nome.arquivo}">
     ...

But the .svn files continue ... but my problem has been resolved.

    
27.02.2018 / 18:55