This repository has been archived by the owner on Oct 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
103 lines (87 loc) · 3.46 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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?xml version="1.0" encoding="UTF-8" ?>
<project name="PHP ini settings" description="Manage php settings" default="setup" phingVersion="3">
<defaultexcludes default="true"/><!--Initializing default excludes-->
<defaultexcludes add="**/.idea"/>
<defaultexcludes add="**/.idea/**"/>
<property name="phing.http.proxy" value="${env.http_proxy}"/>
<target name="setup"
description="Prepares project for development"
depends="phive:install, composer:install, php:version"/>
<target name="refresh"
description="Updates and normalize project files"
depends="setup, changelog:linker, composer:normalize, phing:visualize"/>
<target name="qa"
description="Quality assurance"
depends="php:lint, phpstan:run, behat:run"/>
<target name="git:tags" description="List all git tags">
<!--https://stackoverflow.com/a/34239190/4345061-->
<exec executable="git" passthru="true">
<arg value="log"/>
<arg line="--graph --all --decorate --oneline --simplify-by-decoration"/>
</exec>
</target>
<target name="php:version" description="Get current PHP version">
<exec executable="${php.interpreter}" passthru="true" checkreturn="true">
<arg value="--version"/>
</exec>
</target>
<target name="php:lint" description="Check PHP syntax">
<property name="phplint.dir" value="src" description="Based on pds/skeleton dirs"/>
<phplint haltonfailure="true">
<fileset dir="${phplint.dir}">
<include name="**/*.php"/>
</fileset>
</phplint>
</target>
<target name="composer:install" description="Install for dev">
<composer command="install">
<arg value="--no-suggest"/>
<arg value="--no-interaction"/>
<arg value="--profile"/>
<arg value="--prefer-dist"/>
</composer>
</target>
<target name="composer:normalize" description="Normalizes composer.json according to its JSON schema">
<!--https://packagist.org/packages/localheinz/composer-normalize-->
<composer command="normalize"/>
</target>
<target name="phive:install" description="Install Phar files">
<exec executable="phive" checkreturn="true" passthru="true">
<arg value="--no-progress"/>
<arg value="install"/>
<arg value="--force-accept-unsigned"/>
<arg value="--trust-gpg-keys"/>
<arg value="4AA394086372C20A,8E730BA25823D8B5,2420BAE0A3BE25C6,31C7E470E2138192,A3A2E8F226F0BC06,CF1A108D0E7AE720"/>
</exec>
</target>
<target name="changelog:linker" description="Update links in composer.json">
<composer command="require">
<arg value="symplify/changelog-linker"/>
</composer>
<exec executable="vendor/bin/changelog-linker">
<arg value="link"/>
</exec>
<composer command="remove">
<arg value="symplify/changelog-linker"/>
</composer>
</target>
<target name="phing:visualize" description="Update build.png">
<visualizer destination="docs"/>
</target>
<target name="phpstan:run" description="Analyse at max level">
<exec executable="bin/phpstan" passthru="true" checkreturn="true">
<arg line="--level=max"/>
<arg value="analyze"/>
<arg value="--no-progress"/>
<arg path="src"/>
</exec>
</target>
<target name="behat:run">
<exec executable="vendor/bin/behat" passthru="true" checkreturn="true">
<arg value="--append-snippets"/>
<arg value="--snippets-for"/>
<arg value="--no-interaction"/>
<arg value="--colors"/>
</exec>
</target>
</project>