This repository was archived by the owner on Nov 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.xml
More file actions
67 lines (57 loc) · 2.05 KB
/
build.xml
File metadata and controls
67 lines (57 loc) · 2.05 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<project name="slovicka" default="build">
<property environment="env" />
<fileset id="library" dir="${project.basedir}/libs">
<include name="**/*.php"/>
</fileset>
<fileset id="appCode" dir="${project.basedir}/src">
<include name="**/*.php"/>
<exclude name="**/*/DependencyInjection/Configuration.php"/>
<exclude name="**/*/DependencyInjection/*Extension.php"/>
</fileset>
<fileset id="phpunitTests" dir="${project.basedir}/tests/phpunit">
<include name="**/*.php"/>
</fileset>
<target name="cleanup" description="Workspace cleanup">
<delete>
<fileset dir="${project.basedir}/build">
<exclude name=".gitkeep"/>
<include name="*"/>
</fileset>
</delete>
<delete>
<fileset dir="${project.basedir}/app/cache">
<include name="**/*"/>
</fileset>
</delete>
</target>
<target name="prepare" depends="cleanup" description="Workspace preparation">
<echo>project.basedir: ${project.basedir}</echo>
<if>
<isset property="env.CIRCLE_ARTIFACTS"/>
<then>
<property name="buildOutputPath" value="${env.CIRCLE_ARTIFACTS}"/>
</then>
<else>
<property name="buildOutputPath" value="${project.basedir}/build"/>
</else>
</if>
<echo>buildOutputPath: ${buildOutputPath}</echo>
</target>
<target name="lint" depends="prepare" description="PHP Lint check">
<phplint haltonfailure="true">
<fileset refid="library"/>
<fileset refid="appCode"/>
</phplint>
</target>
<target name="phpcs" depends="prepare" description="PHP_CodeSniffer checks">
<phpcodesniffer standard="${project.basedir}/phpcs-ruleset.xml" haltonerror="true">
<fileset refid="library"/>
<fileset refid="appCode"/>
<fileset refid="phpunitTests"/>
<config name="installed_paths" value="${project.basedir}/vendor/kutny/phpcs-symfony/Standards"/>
<formatter type="summary" usefile="false" />
<formatter type="checkstyle" usefile="true" outfile="${buildOutputPath}/phpcs-checkstyle.xml" />
</phpcodesniffer>
</target>
<target name="build" depends="prepare, lint, phpcs" description="Meta target, spouští ostatní targety"/>
</project>