Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
75 lines (55 sloc) 2.92 KB
<?xml version="1.0" encoding="UTF-8"?>
<project name="Piwik" default="build">
<property environment="env" />
<property name="builddir" value="${env.WORKSPACE}/build" />
<property name="package" value="${env.JOB_NAME}.build${env.BUILD_NUMBER}" />
<property name="archivedir" value="${builddir}/archive" />
<property name="logsdir" value="${builddir}/logs" />
<property name="packagepath" value="${exportdir}/${env.JOB_NAME}" />
<property name="checksumpath" value="${archivedir}/${package}-checksums" />
<property name="patchdir" value="${builddir}/patch" />
<property name="tmpdir" value="${builddir}/tmp" />
<property name="ignorepaths" value="lib/vendor/*,javascript/*,lib/legacy" />
<property name="ownjslist" value="javascript/dashboard.js" />
<!-- Compress own JS -->
<target name="compressownjs">
<echo message="YUI_Compressor for JS files..." />
<echo message="/usr/bin/java -jar /usr/share/yui-compressor/yui-compressor.jar -o ${packagepath}/${filename}.tmp ${packagepath}/${filename};" />
<!-- exec command="/usr/bin/java -jar /usr/share/yui-compressor/yui-compressor.jar -o ${packagepath}/${filename}.tmp ${packagepath}/${filename};" / -->
</target>
<target name="build">
<echo message="Clean..." />
<delete dir="${builddir}" includeemptydirs="true" />
<echo message="Prepare..." />
<mkdir dir="${builddir}" />
<mkdir dir="${logsdir}" />
<mkdir dir="${archivedir}" />
<echo message="PHP_CodeSniffer..." />
<exec executable="phpcs">
<arg line="--extensions=php --report=checkstyle --standard=Zikula --report-file=${logsdir}/phpcs.xml src" />
</exec>
<echo message="JSLint..." />
<fileset dir="javascript" id="jsfiles.raw">
<include name="**/*.js" />
<exclude name="**/*.min.js" />
</fileset>
<pathconvert pathsep=" " property="jsfiles.clean" refid="jsfiles.raw" />
<exec executable="jslint4java" output="build/logs/jslint.xml">
<arg line="--report xml ${jsfiles.clean}" />
</exec>
<!-- PHP MD analysis -->
<echo message="PHP MD..." />
<exec executable="phpmd" dir="${env.WORKSPACE}" failonerror="off">
<arg line="src xml codesize,unusedcode --reportfile '${logsdir}/pmd.xml'" />
</exec>
<echo message="Creating archive..." />
<!-- zip's don't play nicely in Phing - using direct command -->
<!-- exec escape="false" command="cd ${exportdir}; zip -D -r ${archivedir}/${package}.zip ." / -->
<zip destfile="${archivedir}/${package}.zip">
<fileset dir="${env.WORKSPACE}/src/modules">
<include name="**/**" />
</fileset>
</zip>
<!-- foreach list="${ownjslist}" param="filename" target="compressownjs" / -->
</target>
</project>