<!-- This target inherits from an existing target in the imported
utility routines buildfile, and adds its own behavior specific to this
CollectionSpace source code layer. -->
- <target name="rename-files" depends="tenant-utils.rename-files">
+ <target name="rename-files-in-cloned-tenant" depends="tenant-utils.rename-files-in-cloned-tenant">
<move todir="${tenants.dir}/${tenant.shortname}" includeemptydirs="false">
<fileset dir="${tenants.dir}/${tenant.shortname}"/>
<mapper type="regexp" from="^(.*?)${template.tenant.shortname}(.*)$" to="\1${tenant.shortname}\2"/>
</move>
</target>
-
+
+ <!-- This target inherits from an (essentially empty) target in the imported
+ utility routines buildfile, and adds its own behavior specific to this
+ CollectionSpace source code layer. -->
+ <target name="delete-files-in-cloned-tenant"
+ depends="tenant-utils.delete-files-in-cloned-tenant,
+ delete-obsolete-tenant-bindings-delta,
+ delete-merged-tenant-bindings">
+ </target>
+
+ <!-- TODO: Delete the (obsolete) tenant-bindings.delta.xml file, if any,
+ as this file is used only by CollectionSpace 3.3 and earlier versions. -->
+ <target name="delete-obsolete-tenant-bindings-delta">
+ <delete file="${tenant.dir}/tenant-bindings.delta.xml" failonerror="false"/>
+ </target>
+
+ <target name="delete-merged-tenant-bindings">
+ <delete file="${tenant.dir}/tenant-bindings.merged.xml" failonerror="false"/>
+ </target>
+
<!-- This target inherits from an (essentially empty) target in the imported
utility routines buildfile, and adds its own behavior specific to this
CollectionSpace source code layer. -->
flags="gm"/>
</target>
- <!-- TODO: Delete the (obsolete) tenant-bindings.delta.xml and any
- tenant-bindings.merged.xml file in the newly-cloned tenant. -->
-
<!-- This target inherits from an (essentially empty) target in the imported
utility routines buildfile, and adds its own behavior specific to this
CollectionSpace source code layer. -->
<!-- Main target -->
- <target name="clone-tenant" depends="clone-template-folder,
- clone-other-template-files,rename-files,update-text-in-cloned-tenant"
+ <target name="clone-tenant"
+ depends="clone-template-folder,
+ clone-other-template-files,
+ rename-files-in-cloned-tenant,
+ delete-files-in-cloned-tenant,
+ update-text-in-cloned-tenant"
description="Make a copy ('clone') of an existing tenant (used as a template) to create a new tenant">
</target>
<!-- This (essentially empty) target can be inherited and overridden by
any Ant buildfile that imports this tenant-utils buildfile. -->
- <target name="rename-files" depends="clone-other-template-files">
+ <target name="rename-files-in-cloned-tenant" depends="clone-other-template-files">
<echo message="Renaming files, where applicable ..."/>
</target>
+
+ <!-- This (essentially empty) target can be inherited and overridden by
+ any Ant buildfile that imports this tenant-utils buildfile. -->
+ <target name="delete-files-in-cloned-tenant" depends="rename-files-in-cloned-tenant">
+ <echo message="Deleting files, where applicable ..."/>
+ </target>
<!-- This (essentially empty) target can be inherited and overridden by
any Ant buildfile that imports this tenant-utils buildfile. -->
- <target name="update-text-in-cloned-tenant" depends="rename-files">
+ <target name="update-text-in-cloned-tenant" depends="delete-files-in-cloned-tenant">
<echo message="Updating text in the newly-cloned tenant ..."/>
</target>