This repository has been archived by the owner on Apr 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbuild.xml
171 lines (155 loc) · 6.15 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Magento
~
~ NOTICE OF LICENSE
~
~ This source file is subject to the Open Software License (OSL 3.0)
~ that is bundled with this package in the file LICENSE.txt.
~ It is also available through the world-wide-web at this URL:
~ http://opensource.org/licenses/osl-3.0.php
~ If you did not receive a copy of the license and are unable to
~ obtain it through the world-wide-web, please send an email
~ to [email protected] so we can send you a copy immediately.
~
~ DISCLAIMER
~
~ Do not edit or add to this file if you wish to upgrade Magento to newer
~ versions in the future. If you wish to customize Magento for your
~ needs please refer to http://www.magentocommerce.com for more information.
~
~ @category Nosto
~ @package Nosto_Tagging
~ @author Nosto Solutions Ltd <[email protected]>
~ @copyright Copyright (c) 2013-2019 Nosto Solutions Ltd (http://www.nosto.com)
~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
-->
<!--suppress XmlUnboundNsPrefix, PhingDomInspection -->
<project name="nostotagging" default="dist">
<property name="package" value="${phing.project.name}" override="true" />
<property name="buildsrc" value="./build/src" override="false" />
<property name="buildbin" value="./build/bin" override="false" />
<property name="buildroot" value="./build" override="true" />
<property name="builddest" value="./build/package" override="true" />
<property name="srcdir" value="${project.basedir}" override="true" />
<!--suppress PhingDomInspection -->
<property name="packagename" value="Nosto_Tagging-${version}.tgz" override="true" />
<!-- ============================================ -->
<!-- Target: prepare -->
<!-- ============================================ -->
<target name="prepare">
<echo msg="Cleaning up directory ./build" />
<delete dir="${builddest}" />
<delete dir="${buildsrc}" />
<mkdir dir="${builddest}" />
<mkdir dir="${buildsrc}" />
<copy todir="${buildsrc}">
<fileset refid="sourcefiles" />
</copy>
</target>
<fileset dir="${srcdir}" id="sourcefiles">
<patternset id="nostotagging.sources">
<include name="**" />
<exclude name="*.DS_STORE" />
<exclude name="**/.idea/**" />
<exclude name="**/tests/**" />
<exclude name="**/phing/**" />
<exclude name="**/build/**" />
<exclude name="**/vendor/**" />
<exclude name="**/phpseclib/**" />
<exclude name="**/node_modules/**" />
<exclude name="**/build.xml" />
<exclude name="**/ruleset.xml" />
<exclude name="**/*codeception*" />
<exclude name="package.json*" />
<exclude name="Gruntfile.js*" />
<exclude name="*.tgz" />
</patternset>
</fileset>
<!-- ============================================ -->
<!-- Target: build -->
<!-- ============================================ -->
<target name="build" depends="prepare">
<echo msg="Building a package with magazine" />
<exec executable="../../vendor/bin/magazine" dir="${buildsrc}">
<arg value="package"/>
<arg value="magazine.json" />
<arg value="${version}" />
<arg value="-vvv" />
</exec>
<move file="${buildsrc}/${packagename}" tofile="${builddest}/${packagename}" />
<echo msg="Package ready in ${builddest}/${packagename}" />
</target>
<target name="phpmd">
<exec executable="./vendor/bin/phpmd" passthru="true">
<arg value="app"/>
<arg value="--exclude"/>
<arg value="vendor"/>
<arg value="text"/>
<arg value="codesize,"/>
<arg value="naming,"/>
<arg value="unusedcode,"/>
<arg value="controversial,"/>
<arg value="design"/>
</exec>
</target>
<target name="phpcpd">
<exec executable="./vendor/bin/phpcpd" passthru="true">
<arg value="--min-lines=1"/>
<arg value="app"/>
</exec>
</target>
<target name="phpcbf">
<exec executable="./vendor/bin/phpcbf" passthru="true">
<arg value="--colors"/>
<arg value="--report-width=auto"/>
<arg value="--standard=ruleset.xml"/>
<arg value="app"/>
</exec>
</target>
<target name="phpcs">
<exec executable="./vendor/bin/phpcs" passthru="true">
<arg value="--colors"/>
<arg value="--report-width=auto"/>
<arg value="--standard=ruleset.xml"/>
<arg value="--severity=3"/>
<arg value="app"/>
</exec>
</target>
<target name="phan">
<exec executable="./vendor/bin/phan" passthru="true">
<arg value="--progress-bar"/>
<arg value="--signature-compatibility"/>
<arg value="--config-file=phan.php"/>
<arg value="--dead-code-detection"/>
<arg value="."/>
</exec>
</target>
<target name="update-lib">
<echo msg="Updating lib" />
<exec executable="composer" dir="${srcdir}">
<arg value="install" />
</exec>
<phingcall target="pearify"></phingcall>
</target>
<target name="pearify">
<exec executable="composer" dir="${srcdir}">
<arg value="dump-autoload" />
<arg value="--optimize" />
</exec>
<exec executable="./vendor/bin/pearify" dir="${srcdir}" passthru="true">
<arg value="process" />
<arg value="." />
</exec>
<echo msg="Lib updated" />
</target>
<target name="validate" depends="update-lib, phpcs, phan, phpmd, phpcpd">
<echo msg="All done" />
</target>
<target name="dist" depends="update-lib, phpcs, phan, phpmd, phpcpd, build">
<echo msg="All done" />
</target>
<target name="quick-build" depends="build">
<echo msg="All done" />
</target>
</project>