1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <project name =" ZendServerDeploymentHelper" default =" build" description =" " >
3
+ <property environment =" env" />
4
+
5
+ <property name =" env.TRAVIS_BRANCH" value =" local" />
6
+ <property name =" env.TRAVIS_TAG" value =" " />
7
+
8
+ <php expression =" str_replace(['tags/', 'branches/', '/'], ['', '', '-'], !empty('${ env.TRAVIS_TAG } ') ? '${ env.TRAVIS_TAG } ' : '${ env.TRAVIS_BRANCH } ')" returnProperty =" build.version" />
9
+ <php expression =" date('Y-m-d')" returnProperty =" library.releasedate" />
10
+ <php expression =" !empty('${ env.TRAVIS_TAG } ') ? '${ project.name } -latest.zpk' : '${ project.name } -${ env.TRAVIS_BRANCH } -latest.zpk'" returnProperty =" build.filename.latest" />
11
+
12
+ <property file =" ./build.properties" />
13
+
14
+ <fileset id =" sourcefileset" dir =" ${ project.root } " >
15
+ <include name =" deph.php" />
16
+ <include name =" init_autoloader.php" />
17
+ <include name =" LICENSE.txt" />
18
+ <include name =" README.md" />
19
+ <include name =" etc/**" />
20
+ <include name =" src/**" />
21
+ <include name =" vendor/**" />
22
+ <exclude name =" **/tests/" />
23
+ <exclude name =" **/test/" />
24
+ <exclude name =" **/composer.json" />
25
+ <exclude name =" **/composer.lock" />
26
+ <exclude name =" **/.gitignore" />
27
+ <exclude name =" **/.gitattributes" />
28
+ <exclude name =" **/.gitmodules" />
29
+ <exclude name =" **/.scruntinizer.yml" />
30
+ <exclude name =" **/.travis.yml" />
31
+ <exclude name =" **/.coveralls.yml" />
32
+ <exclude name =" **/build.xml" />
33
+ <exclude name =" **/build.properties" />
34
+ <exclude name =" **/phpunit.xml" />
35
+ <exclude name =" **/phpunit.xml.dist" />
36
+ <exclude name =" **/phpmd.xml.dist" />
37
+ <exclude name =" **/phpdox.xml.dist" />
38
+ <exclude name =" **/installed.json" />
39
+ <exclude name =" **/deployment.xml.in" />
40
+ <exclude name =" **/deployment.xml.in.dist" />
41
+ <exclude name =" **/*.md" />
42
+ <exclude name =" **/*.mdown" />
43
+ <exclude name =" **/.php_cs" />
44
+ <exclude name =" **/Vagrantfile" />
45
+ <exclude name =" **/Doxyfile" />
46
+ </fileset >
47
+
48
+ <target name =" init" >
49
+ <tstamp />
50
+ <mkdir dir =" ${ dist.dir } " />
51
+ <mkdir dir =" ${ build.dir } " />
52
+ <mkdir dir =" ${ build.dir } /scripts" />
53
+ <mkdir dir =" ${ build.dir } /src" />
54
+ </target >
55
+
56
+ <target name =" clean" description =" Cleanup build artifacts" >
57
+ <delete dir =" ${ dist.dir } " includeemptydirs =" true" quiet =" true" />
58
+ <delete dir =" ${ build.dir } " includeemptydirs =" true" quiet =" true" />
59
+ </target >
60
+
61
+ <target name =" build" depends =" -create-zpk" description =" Default build. Will build the ZPK." />
62
+
63
+ <target name =" -create-zpk" depends =" init" description =" Create a zend deployment package" >
64
+ <!-- http://files.zend.com/help/Zend-Server-6/content/updating_libraries.htm -->
65
+
66
+ <!-- <copy todir="${build.dir}/scripts" tstamp="true">-->
67
+ <!-- <fileset dir="${project.root}/scripts">-->
68
+ <!-- <include name="**"/>-->
69
+ <!-- </fileset>-->
70
+ <!-- </copy>-->
71
+
72
+ <copy todir =" ${ build.dir } /src" tstamp =" true" >
73
+ <fileset refid =" sourcefileset" />
74
+ </copy >
75
+
76
+ <copy file =" ${ project.root } /deployment.in.xml" tofile =" ${ build.dir } /deployment.xml" tstamp =" true" overwrite =" true" >
77
+ <filterchain >
78
+ <replacetokens begintoken =" %%" endtoken =" %%" >
79
+ <token key =" project.version" value =" ${ project.version } " />
80
+ <token key =" library.releasedate" value =" ${ library.releasedate } " />
81
+ <token key =" library.updateurl" value =" ${ library.updateurl } " />
82
+ </replacetokens >
83
+ </filterchain >
84
+ </copy >
85
+
86
+ <zip destfile =" ${ dist.dir } /${ dist.filename } .zpk" >
87
+ <fileset dir =" ${ build.dir } " >
88
+ <include name =" **" />
89
+ </fileset >
90
+ </zip >
91
+
92
+ <copy file =" ${ dist.dir } /${ dist.filename } .zpk" tofile =" ${ dist.dir } /${ build.filename.latest } " />
93
+ </target >
94
+ </project >
0 commit comments