document content-from-file
[shpub.git] / build.xml
index 6ad92ac..7c8ac5d 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <project name="shpub" default="phar" basedir=".">
 
- <property name="version"  value="0.1.0" />
+ <property name="version"  value="0.5.2" />
  <property name="pharfile" value="${phing.dir}/dist/${phing.project.name}-${version}.phar" />
  <property name="libdir" value="${phing.dir}/lib"/>
 
   </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"
@@ -56,6 +59,7 @@
   <pearPackageFileset id="dep-MIME_Type" package="pear.php.net/MIME_Type"/>
   <pearPackageFileset id="dep-Net_URL2" package="pear.php.net/Net_URL2"/>
   <pearPackageFileset id="dep-PEAR" package="pear.php.net/PEAR">
+   <include name="PEAR.php"/>
    <include name="PEAR/Exception.php"/>
   </pearPackageFileset>