Permalink
Browse files

Added PHP CodeBrowser to the build stack

  • Loading branch information...
hijarian committed Jul 8, 2013
1 parent dfa23fc commit bb81b402e586c169e1e01b672a61b3165ea2360f
Showing with 31 additions and 1 deletion.
  1. +27 −0 build.xml
  2. +2 −1 composer.json
  3. +2 −0 installation.xml
View
@@ -153,5 +153,32 @@
</if>
</target>
+ <!-- Generating the highlighted sources with the marks from Code Sniffer and Mess Detector (and code coverage, too) -->
+ <target name="cb" depends="install-composer-libraries,prepare-codebrowser">
+ <echo msg="Generating the browsable codebase..." />
+ <exec executable="${path.composer.vendor}/bin/phpcb" passthru="true">
+ <arg value="--log"/>
+ <arg path="${path.reports}"/>
+ <arg value="--output"/>
+ <arg path="${path.reports}/codebrowser/"/>
+ <arg value="--source"/>
+ <arg path="${path.src}"/>
+ </exec>
+ </target>
+
+ <!-- Prepare the destination folder for Codebrowser report. -->
+ <target name="prepare-codebrowser">
+ <echo msg="Recreating a directory for codebrowser at ${path.reports}/codebrowser/"/>
+ <delete dir="${path.reports}/codebrowser/" includeemptydirs="true" failonerror="true" quiet="true"/>
+ <mkdir dir="${path.reports}/codebrowser/"/>
+ </target>
+
+ <!-- Prepare the destination folder for distribution archive. -->
+ <target name="prepare-dist">
+ <echo msg="Recreating a distribution directory at ${path.dist}"/>
+ <delete dir="${path.dist}" includeemptydirs="true" failonerror="true" quiet="true"/>
+ <mkdir dir="${path.dist}"/>
+ </target>
+
<import file="${project.basedir}/installation.xml" />
</project>
View
@@ -35,7 +35,8 @@
"phploc/phploc": "*",
"sebastian/phpcpd": "*",
"squizlabs/php_codesniffer": "1.*",
- "ardem/yii-coding-standard": "dev-master"
+ "ardem/yii-coding-standard": "dev-master",
+ "mayflower/php-codebrowser": "1.0.*@dev"
},
"minimum-stability": "dev"
}
View
@@ -35,10 +35,12 @@
<available file="${path.composer.vendor}/bin/pinocchio" />
<available file="${path.composer.vendor}/bin/phpunit" />
<available file="${path.composer.vendor}/bin/phpcs" />
+ <available file="${path.composer.vendor}/bin/phpcb" />
</and>
</not>
<then>
<echo msg="It seems we don't have Composer-managed libraries installed yet, installing..."/>
+ <exec command="php ./composer.phar update --dev" passthru="true"/>
<exec command="php ./composer.phar install --dev" passthru="true"/>
<echo msg="Now all Composer-managed libraries should have been installed to ${path.composer.vendor}" />

0 comments on commit bb81b40

Please sign in to comment.