]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-6585: Remove obsolete and merged tenant bindings files from newly-cloned tenan...
authorAron Roberts <aron@socrates.berkeley.edu>
Sat, 14 Mar 2015 00:30:04 +0000 (17:30 -0700)
committerAron Roberts <aron@socrates.berkeley.edu>
Sat, 14 Mar 2015 00:30:04 +0000 (17:30 -0700)
build-tenant.xml
tenant-utils-build.xml

index 50c185baa6cde07fc165c933fed11051a02b6b9d..217f75aa38eb0b9d03940461bb2ff49bc57f2bb0 100644 (file)
    <!-- 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. -->
@@ -71,9 +90,6 @@
       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. -->
index 309e6ac0e42fa0ce0edf5d2e04ddc366c212975f..9d357a8642e385de3f0e6b59e6a8d4704e350395 100644 (file)
   
   <!-- 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>