forked from netz98/n98-magerun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
72 lines (60 loc) · 2.36 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
<?xml version="1.0"?>
<!--
Phing build file to create a executable phar file by defined src.
@see http://www.phing.info/
Build phar with:
phing dist
-->
<project name="n98-magerun" default="dist">
<fileset dir="." id="root_folder">
<include name="config.yaml" />
<include name="MIT-LICENSE.txt" />
</fileset>
<fileset dir="src" id="src_folder">
<include name="**/**" />
</fileset>
<fileset dir="res" id="res_folder">
<include name="**/**" />
</fileset>
<fileset dir="vendor" id="vendor_folder">
<include name="**/**" />
<exclude name=".git/**" />
<exclude name=".svn/**" />
<exclude name="**/Tests/**" />
<exclude name="**/tests/**" />
<exclude name="**/doc/**" />
<exclude name="fzaninotto/faker/src/Faker/ORM" />
<exclude name="phpunit/**" />
</fileset>
<target name="dist">
<exec command="composer.phar install" dir="${project.basedir}" passthru="true" />
<phingcall target="dist_unix" />
<!-- Revert dev settings -->
<exec command="composer.phar install --dev" dir="${project.basedir}" passthru="true" />
</target>
<target name="dist_unix">
<pharpackage basedir="./" stub="_cli_stub.php" signature="sha512" compression="bzip2" destfile="./n98-magerun.phar">
<metadata>
<element name="version" value="1.0.0" />
<element name="authors">
<element name="Christian Münch">
<element name="e-mail" value="[email protected]" />
</element>
</element>
</metadata>
<fileset refid="root_folder" />
<fileset refid="src_folder" />
<fileset refid="res_folder" />
<fileset refid="vendor_folder" />
</pharpackage>
<!-- make phar executable -->
<exec command="git config core.filemode true" />
<exec command="git update-index --chmod=+x n98-magerun.phar" />
<chmod file="./n98-magerun.phar" mode="775" />
<exec command="git add ./n98-magerun.phar" />
</target>
<target name="install">
<exec command="sudo cp ${project.basedir}/n98-magerun.phar /usr/local/bin/n98-magerun.phar;" />
<exec command="sudo chmod a+x /usr/local/bin/n98-magerun.phar;" />
</target>
</project>