forked from NatLibFi/RecordManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
38 lines (33 loc) · 2.22 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?xml version="1.0" encoding="UTF-8"?>
<project name="RecordManager" basedir="." default="main">
<property name="tmp" value="/tmp" />
<property name="package" value="${phing.project.name}" override="true" />
<property name="builddir" value="${tmp}/build/${phing.project.name}" override="true" />
<property name="srcdir" value="${project.basedir}" override="true" />
<property name="php-cs-fixers" value="no_spaces_after_function_name,no_trailing_whitespace,no_unused_imports,lowercase_keywords,encoding,no_spaces_inside_parenthesis,no_closing_tag,visibility_required,no_empty_statement,no_extra_consecutive_blank_lines,no_blank_lines_after_class_opening,no_blank_lines_after_phpdoc,binary_operator_spaces,no_singleline_whitespace_before_semicolons,ternary_operator_spaces,phpdoc_no_access,no_leading_import_slash" />
<property name="php-cs-fixer-extra-params" value=""/>
<!-- Main Target -->
<target name="main" description="main target">
</target>
<!-- Continuous Integration Tasks -->
<target name="ci-tasks" description="continuous integration tasks">
<phingcall target="phpunit"/>
<phingcall target="phpcs"/>
<phingcall target="php-cs-fixer-dryrun"/>
</target>
<!-- PHPUnit -->
<target name="phpunit" description="Run tests">
<exec command="${srcdir}/vendor/bin/phpunit -dzend.enable_gc=0 -c ${srcdir}/tests/phpunit.xml ${srcdir}/tests" passthru="true" checkreturn="true" />
</target>
<!-- PHP CodeSniffer -->
<target name="phpcs">
<exec command="${srcdir}/vendor/bin/phpcs --standard=PEAR --extensions=php *.php ${srcdir}/src/RecordManager" escape="false" passthru="true" checkreturn="true" />
</target>
<!-- php-cs-fixer (first task applies fixes, second task simply checks if they are needed) -->
<target name="php-cs-fixer">
<exec command="${srcdir}/vendor/bin/php-cs-fixer fix ${srcdir}/src/RecordManager --rules=${php-cs-fixers} --verbose ${php-cs-fixer-extra-params}" passthru="true" escape="false" />
</target>
<target name="php-cs-fixer-dryrun">
<exec command="${srcdir}/vendor/bin/php-cs-fixer fix ${srcdir}/src/RecordManager --rules=${php-cs-fixers} --dry-run --verbose --diff ${php-cs-fixer-extra-params}" passthru="true" escape="false" checkreturn="true" />
</target>
</project>