forked from shogodev/argilla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
103 lines (102 loc) · 4.31 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="shogocms" basedir="." default="build">
<property name = "coverage.database" value = "build/logs/cover.db" />
<target name="build" description="Сборка" depends="clearCache, clean, test, phpcs, phpmd, phpcpd, phploc"/>
<target name="createSchema" description="Записать схему БД">
<phing phingfile="build/db.xml" target="createSchema"/>
</target>
<target name="applySchema" description="Применить схему БД">
<phing phingfile="build/db.xml" target="applySchema"/>
</target>
<target name="createDump" description="Сделать дамп базы">
<phing phingfile="build/db.xml" target="createDump"/>
</target>
<target name="applyDump" description="Накатить дамп">
<phing phingfile="build/db.xml" target="applyDump"/>
</target>
<target name="migrate" description="Накатить миграции">
<phing phingfile="build/db.xml" target="migrate"/>
</target>
<target name="revertSchema" description="Восстановить оригинальный файл схемы (git)">
<phing phingFile="build/db.xml" target="revertSchema"/>
</target>
<target name="clearCache">
<echo>Clear assets folders</echo>
<exec command="rm -rf *" dir="assets/"/>
<exec command="rm -rf *" dir="backend/assets/"/>
</target>
<target name = "clean">
<exec command = "rm build/logs/*.xml" />
<exec command = "rm build/logs/*.csv" />
<exec command = "rm -Rf *" dir = "protected/runtime" />
</target>
<target name = "getCheckingApp">
<!-- это используется для того, чтобы можно было говорить phing -Dfrontend или phing -Dbackend, указывая фингу с каким приложением мы работаем -->
<if>
<and>
<isset property = "frontend" />
<not>
<isset property = "backend" />
</not>
</and>
<then>
<property name = "noBackend" value = "1" />
</then>
</if>
<if>
<and>
<isset property = "backend" />
<not>
<isset property = "frontend" />
</not>
</and>
<then>
<property name = "noFrontend" value = "1" />
</then>
</if>
</target>
<target name = "phpcs" description="PHP Codesniffer" depends = "getCheckingApp">
<phing phingFile = "build/runners/checker.xml">
<property name = "whatToCheck" value = "phpcs" />
</phing>
</target>
<target name = "phpmd" description = "PHP Mess Detector" depends = "getCheckingApp">
<phing phingFile = "build/runners/checker.xml">
<property name = "whatToCheck" value = "phpmd" />
</phing>
</target>
<target name = "phpcpd" description = "PHP Copy-Paste detector" depends = "getCheckingApp">
<phing phingFile = "build/runners/checker.xml">
<property name = "whatToCheck" value = "phpcpd" />
</phing>
</target>
<target name = "phploc" depends = "getCheckingApp" description = "Снятие метрик phploc">
<phing phingFile = "build/runners/checker.xml">
<property name = "whatToCheck" value = "phploc" />
</phing>
</target>
<target name = "phpunit" description = "PHPUnit" depends = "getCheckingApp">
<phing phingFile = "build/runners/checker.xml">
<property name = "whatToCheck" value = "phpunit" />
</phing>
</target>
<target name = "test" depends = "phpunit" description = "Запуск тестов" />
<target name="fixAccessRights" description="Починить права доступа">
<phing phingFile = "build/chmod.xml" />
</target>
<target name = "coverage" description = "Собрать code-coverage">
<phing phingFile = "build/coverage.xml" />
</target>
<target name = "jsPack" description = "Упаковать JS">
<phing phingFile = "build/bootstrap.xml" target = "packJS" />
</target>
<target name = "jsCompile" description = "Склеить JS">
<phing phingFile = "build/bootstrap.xml" target = "compileJS" />
</target>
<target name = "addPassword" description = "Добавить пароль для пользователя">
<phing phingFile = "build/passwords.xml" target = "addPassword" />
</target>
<target name = "bootstrap" description = "Do a bootstrap process">
<phing phingFile = "build/bootstrap.xml" />
</target>
</project>