Fix #41: Use correct SQL datetime format for tokens
[grauphel.git] / build.xml
index 5524954..4349f17 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -4,14 +4,21 @@
     grauphel phing build file. Used to create releases.
   -->
 
-  <loadfile property="version" file="appinfo/version"/>
-  <property name="zipfile"  value="${phing.project.name}-${version}.zip" />
+  <loadfile property="version" file="appinfo/version">
+    <filterchain>
+      <replaceregexp>
+       <regexp pattern="\r?\n" replace=""/>
+      </replaceregexp>
+    </filterchain>
+  </loadfile>
+  <property name="zipfile"  value="${phing.project.name}-${version}.tar.gz" />
   <property name="distfile" value="dist/${zipfile}" />
 
   <fileset id="fs.zip" dir=".">
    <include name="**"/>
    <exclude name="dist/"/>
    <exclude name=".git"/>
+   <exclude name=".travis.yml"/>
    <exclude name="**/.gitignore"/>
    <exclude name="**/build.xml"/>
    <exclude name="**/README.html"/>
      </then>
     </if>
     <!--<delete file="${distfile}" failonerror="false"/>-->
-    <zip destfile="${distfile}" prefix="grauphel/">
+    <tar destfile="${distfile}" prefix="grauphel/" compression="gzip">
       <fileset refid="fs.zip"/>
-    </zip>
+    </tar>
   </target>
 
+ <target name="docs" description="render documentation">
+  <rst file="README.rst"/>
+ </target>
+
+ <target name="update-website" depends="docs">
+  <exec command="xmlstarlet sel -t -c '/_:html/_:body/_:div' README.html
+   | xmllint --format -
+   |grep -v '?xml version'
+   > ~/Dev/html/cweiske.de/www/grauphel.htm"/>
+ </target>
+
 </project>