Do not overwrite dist/*.phar files
[shpub.git] / build.xml
index 12a01f3..c57735d 100644 (file)
--- a/build.xml
+++ b/build.xml
   </copy>
 
   <mkdir dir="${phing.dir}/dist"/>
-  <!-- <delete file="${pharfile}"/> -->
+
+  <available file="${pharfile}" property="phar_exists" value="1"/>
+  <fail if="phar_exists" message="File exists already: ${pharfile}"/>
+
   <pharpackage basedir="${phing.dir}"
    destfile="${pharfile}"
    stub="${phing.dir}/src/phar-stub.php"