Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit bd84e7501b75a06e2018d8730b3c72310ba22151 @marcelog committed Apr 20, 2012
@@ -0,0 +1,2 @@
+build/*
+vendor/*
@@ -0,0 +1,90 @@
+version=0.0.0
+name=App
+summary="Summary"
+author.name="Marcelo Gornstein"
+author.email="marcelog@gmail.com"
+author.username="marcelog"
+pear.channel="pear.marcelog.name"
+description="Description"
+dir.output=${project.basedir}/build
+dir.tmp=${dir.output}/tmp
+dir.src=${project.basedir}/src/mg/App
+dir.vendor=${project.basedir}/vendor
+dir.vendor.bin=${dir.vendor}/bin
+dir.vendor.php=${dir.vendor}/php
+phing=${php.exec} ${dir.vendor.php}/phing.php -Dversion=${version}
+;phing=${dir.vendor.bin}/phing
+package.output.dir=${dir.output}
+php.ini=${project.basedir}/resources/php.ini
+php.args=-c ${php.ini} -d include_path=${dir.vendor.php}:${dir.vendor.php}/log4php
+php.bin=/usr/php-5.3/bin/php
+php.exec=${php.bin} ${php.args}
+defaultpear.bin=/usr/php-5.3/bin/pear
+pear.cfg=${dir.vendor}/.pearrc
+defaultpear.exec=${defaultpear.bin} -c ${pear.cfg}
+pear.exec=${dir.vendor}/bin/pear -c ${pear.cfg}
+
+phpdepend.exec=${php.exec} ${dir.vendor.bin}/pdepend
+phpdepend.output=${dir.output}/php-depend
+phpdepend.output.html.dir=${phpdepend.output}/html
+phpdepend.output.html.file=${phpdepend.output.html.dir}/index.html
+phpdepend.output.xml.dir=${phpdepend.output}
+phpdepend.output.xml.file=${phpdepend.output.xml.dir}/php-depend.xml
+phpdepend.style=resources/pdepend.xsl
+phpdepend.args=--jdepend-xml=${phpdepend.output.xml.file} --jdepend-chart=${phpdepend.output.html.dir}/pdepend.svg --ignore=.git,test/ --overview-pyramid=${phpdepend.output.html.dir}/pyramid.svg ${dir.src}
+
+phpcs.exec=${php.exec} ${dir.vendor.bin}/phpcs
+phpcs.output=${dir.output}/php-cs
+phpcs.output.html.dir=${phpcs.output}/html
+phpcs.output.html.file=${phpcs.output.html.dir}/index.html
+phpcs.output.xml.dir=${phpcs.output}
+phpcs.output.xml.file=${phpcs.output.xml.dir}/php-cs.xml
+phpcs.style=resources/checkstyle.xsl
+phpcs.args=--report=checkstyle --report-file=${phpcs.output.xml.file} --standard=PEAR --extensions=php --ignore=.git/,doc/,resources/,build ${dir.src}
+
+junit.output.xml.dir=${phpunit.output}
+junit.output.xml.file=${junit.output.xml.dir}/junit.xml
+junit.style=resources/phpunit_to_surefire.xslt
+phpunit.exec=TMPDIR=${dir.output}/tmp TEST=true ${php.exec} ${dir.vendor.bin}/phpunit
+phpunit.output=${dir.output}/php-unit
+phpunit.output.html.dir=${phpunit.output}/html
+phpunit.output.xml.dir=${phpunit.output}
+phpunit.output.xml.file=${phpunit.output.xml.dir}/php-unit.xml
+phpunit.args=${php.args} --repeat 1 --stop-on-error --stop-on-failure --stop-on-incomplete --debug --verbose --process-isolation --bootstrap ./bootstrap.php --configuration phpunit.xml --log-junit ${phpunit.output.xml.file} --coverage-html ${phpunit.output.html.dir} --verbose
+
+phpmd.exec=${php.exec} ${dir.vendor.bin}/phpmd
+phpmd.output=${dir.output}/php-md
+phpmd.output.html.dir=${phpmd.output}/html
+phpmd.output.html.file=${phpmd.output.html.dir}/index.html
+phpmd.output.xml.dir=${phpmd.output}
+phpmd.output.xml.file=${phpmd.output.xml.dir}/php-md.xml
+phpmd.style=resources/pmd.xslt
+phpmd.args=${dir.src} xml rulesets/codesize.xml,rulesets/unusedcode.xml,rulesets/naming.xml --extensions php --reportfile ${phpmd.output.xml.file}
+
+phpcpd.exec=${php.exec} ${dir.vendor.bin}/phpcpd
+phpcpd.output=${dir.output}/php-cpd
+phpcpd.output.html.dir=${phpcpd.output}/html
+phpcpd.output.html.file=${phpcpd.output.html.dir}/index.html
+phpcpd.output.xml.dir=${phpcpd.output}
+phpcpd.output.xml.file=${phpcpd.output.xml.dir}/php-cpd.xml
+phpcpd.style=resources/cpd.xslt
+phpcpd.args=--log-pmd ${phpcpd.output.xml.file} --verbose ${dir.src}
+
+phpdoc.exec=${php.exec} ${dir.vendor.bin}/docblox
+phpdoc.output=${dir.output}/php-doc
+phpdoc.output.html.dir=${phpdoc.output}/html
+phpdoc.args=-d ${dir.src} -t ${phpdoc.output.html.dir} --sourcecode --visibility public,protected,private --parseprivate --title ${summary}
+
+phploc.exec=${php.exec} ${dir.vendor.bin}/phploc
+phploc.output=${dir.output}/php-loc
+phploc.output.html.dir=${phploc.output}/html
+phploc.output.html.file=${phploc.output.html.dir}/phploc.txt
+phploc.args=${dir.src}
+
+phar=${name}-${version}.phar
+genphar.exec=${php.exec} resources/generatePhar.php
+genphar.args=${package.output.dir}/${phar} ${dir.src}
+peartgz=${name}-${version}.tgz
+
+genpear.exec=${php.exec} resources/generatePackageXml.php ${name} ${summary} ${description} ${version} ${author.name} ${author.email} ${author.username} ${pear.channel}
+
252 build.xml
@@ -0,0 +1,252 @@
+<project name="CiPhp" default="all" basedir=".">
+ <property file="./build.properties"/>
+ <target name="prepare" depends="clean">
+ <mkdir dir="${dir.output}"/>
+ <mkdir dir="${dir.tmp}"/>
+ </target>
+
+ <target name="clean">
+ <delete dir="${dir.output}"/>
+ </target>
+
+ <target name="phpdepend">
+ <exec command="${phing} _phpdepend" passthru="true"/>
+ </target>
+ <target name="_phpdepend">
+ <mkdir dir="${phpdepend.output.xml.dir}"/>
+ <mkdir dir="${phpdepend.output.html.dir}"/>
+ <exec
+ command="${phpdepend.exec} ${phpdepend.args}"
+ dir="${project.basedir}"
+ passthru="true"
+ />
+ <xslt
+ file="${phpdepend.output.xml.file}"
+ tofile="${phpdepend.output.html.file}"
+ style="${phpdepend.style}"
+ />
+ </target>
+
+ <target name="phpcs">
+ <exec command="${phing} _phpcs" passthru="true"/>
+ </target>
+ <target name="_phpcs">
+ <mkdir dir="${phpcs.output.xml.dir}"/>
+ <mkdir dir="${phpcs.output.html.dir}"/>
+ <exec
+ command="${phpcs.exec} ${phpcs.args}"
+ dir="${project.basedir}"
+ passthru="true"
+ />
+ <xslt
+ file="${phpcs.output.xml.file}"
+ tofile="${phpcs.output.html.file}"
+ style="${phpcs.style}"
+ />
+ </target>
+
+ <target name="phpunit">
+ <exec command="${phing} _phpunit" passthru="true"/>
+ </target>
+ <target name="_phpunit">
+ <mkdir dir="${phpunit.output.xml.dir}"/>
+ <mkdir dir="${phpunit.output.html.dir}"/>
+ <exec
+ command="${phpunit.exec} ${phpunit.args}"
+ dir="${project.basedir}/test"
+ passthru="true"
+ />
+ <xslt
+ file="${phpunit.output.xml.file}"
+ tofile="${junit.output.xml.file}"
+ style="${junit.style}"
+ />
+ </target>
+
+ <target name="phpmd">
+ <exec command="${phing} _phpmd" passthru="true"/>
+ </target>
+ <target name="_phpmd">
+ <mkdir dir="${phpmd.output.xml.dir}"/>
+ <mkdir dir="${phpmd.output.html.dir}"/>
+ <exec
+ command="${phpmd.exec} ${phpmd.args}"
+ dir="${project.basedir}"
+ passthru="true"
+ />
+ <xslt
+ file="${phpmd.output.xml.file}"
+ tofile="${phpmd.output.html.file}"
+ style="${phpmd.style}"
+ />
+ </target>
+
+ <target name="phpcpd">
+ <exec command="${phing} _phpcpd" passthru="true"/>
+ </target>
+ <target name="_phpcpd">
+ <mkdir dir="${phpcpd.output.xml.dir}"/>
+ <mkdir dir="${phpcpd.output.html.dir}"/>
+ <exec
+ command="${phpcpd.exec} ${phpcpd.args}"
+ dir="${project.basedir}"
+ passthru="true"
+ />
+ <xslt
+ file="${phpcpd.output.xml.file}"
+ tofile="${phpcpd.output.html.file}"
+ style="${phpcpd.style}"
+ />
+ </target>
+
+ <target name="phpdoc">
+ <exec command="${phing} _phpdoc" passthru="true"/>
+ </target>
+ <target name="_phpdoc">
+ <mkdir dir="${phpdoc.output.html.dir}"/>
+ <exec
+ command="${phpdoc.exec} ${phpdoc.args}"
+ dir="${project.basedir}"
+ passthru="true"
+ />
+ </target>
+
+ <target name="phploc">
+ <exec command="${phing} _phploc" passthru="true"/>
+ </target>
+ <target name="_phploc">
+ <mkdir dir="${phploc.output.html.dir}"/>
+ <exec
+ command="${phploc.exec} ${phploc.args} > ${phploc.output.html.file}"
+ dir="${project.basedir}"
+ passthru="true"
+ />
+ </target>
+
+ <target name="package">
+ <exec command="${phing} _package" passthru="true"/>
+ </target>
+ <target name="_package">
+ <mkdir dir="${package.output.dir}"/>
+ <exec
+ command="${pear.exec} channel-discover ${pear.channel}"
+ dir="${project.basedir}" passthru="true"
+ />
+ <exec
+ command="${genphar.exec} ${genphar.args}"
+ dir="${project.basedir}"
+ passthru="true"
+ />
+ <exec
+ command="${genpear.exec}" dir="${project.basedir}" passthru="true"
+ output="${dir.output}/package.xml"
+ />
+ <copy file="${dir.output}/package.xml" tofile="${dir.src}/package.xml" />
+ <exec
+ command="${pear.exec} package" dir="${dir.src}" passthru="true"
+ />
+ <delete file="${dir.src}/package.xml" />
+ <move file="${dir.src}/${peartgz}" tofile="${dir.output}/${peartgz}" overwrite="true"/>
+ </target>
+
+ <target name="install-dependencies">
+ <mkdir dir="${dir.vendor}"/>
+ <exec
+ command="${defaultpear.bin} config-create ${dir.vendor} ${dir.vendor}/.pearrc"
+ passthru="true"
+ />
+ <exec
+ command="${defaultpear.exec} config-set php_bin ${php.bin}"
+ passthru="true"
+ />
+ <exec
+ command="${defaultpear.exec} config-set php_dir ${dir.vendor}/php"
+ passthru="true"
+ />
+ <exec
+ command="${defaultpear.exec} config-set bin_dir ${dir.vendor}/bin"
+ passthru="true"
+ />
+ <exec
+ command="${defaultpear.exec} config-set cache_dir ${dir.vendor}/cache"
+ passthru="true"
+ />
+ <exec
+ command="${defaultpear.exec} config-set cfg_dir ${dir.vendor}/cfg"
+ passthru="true"
+ />
+ <exec
+ command="${defaultpear.exec} config-set data_dir ${dir.vendor}/data"
+ passthru="true"
+ />
+ <exec
+ command="${defaultpear.exec} config-set download_dir ${dir.vendor}/download"
+ passthru="true"
+ />
+ <exec
+ command="${defaultpear.exec} config-set temp_dir ${dir.vendor}/tmp"
+ passthru="true"
+ />
+ <exec
+ command="${defaultpear.exec} config-set doc_dir ${dir.vendor}/doc"
+ passthru="true"
+ />
+ <exec
+ command="${defaultpear.exec} config-set test_dir ${dir.vendor}/test"
+ passthru="true"
+ />
+ <exec
+ command="${defaultpear.exec} config-set www_dir ${dir.vendor}/www"
+ passthru="true"
+ />
+ <exec
+ command="${defaultpear.exec} config-set auto_discover 1"
+ passthru="true"
+ />
+ <exec
+ command="${defaultpear.exec} install pear"
+ passthru="true"
+ />
+ <exec
+ command="${pear.exec} install --alldeps pear.phpunit.de/PHPUnit"
+ passthru="true"
+ />
+ <exec
+ command="${pear.exec} install --alldeps phpunit/phploc"
+ passthru="true"
+ />
+ <exec
+ command="${pear.exec} install --alldeps pear.docblox-project.org/DocBlox"
+ passthru="true"
+ />
+ <exec
+ command="${pear.exec} install --alldeps pear.pdepend.org/PHP_Depend-beta"
+ passthru="true"
+ />
+ <exec
+ command="${pear.exec} install --alldeps pear.phpmd.org/PHP_PMD"
+ passthru="true"
+ />
+ <exec
+ command="${pear.exec} install --alldeps pear.phpunit.de/phpcpd"
+ passthru="true"
+ />
+ <exec
+ command="${pear.exec} install --alldeps PHP_CodeSniffer"
+ passthru="true"
+ />
+ <exec
+ command="${pear.exec} install --alldeps pear.phing.info/phing"
+ passthru="true"
+ />
+ </target>
+
+ <target name="clean-dependencies">
+ <delete dir="${dir.vendor}"/>
+ </target>
+
+ <target name="all" depends="clean, prepare, package, report"/>
+ <target name="build" depends="prepare, test"/>
+ <target name="test" depends="prepare, phpunit"/>
+ <target name="report" depends="build, phploc, phpdoc, phpdepend, phpcs, phpmd, phpcpd"/>
+</project>
Oops, something went wrong.

0 comments on commit bd84e75

Please sign in to comment.