-
Notifications
You must be signed in to change notification settings - Fork 0
/
full_packager.xml
executable file
·136 lines (119 loc) · 4.88 KB
/
full_packager.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
<?xml version="1.0" encoding="UTF-8"?>
<!-- ================================================================== -->
<!-- redPRODUCTFINDER full packager -->
<!-- This PHING build file generates the redPRODUCTFINDER extension package -->
<!-- including all extra extensions: modules and plugins -->
<!-- Change the following variables in build.properties file -->
<!-- (copy variables from build.properties.dist ) -->
<!-- - change the version in variable comp.version -->
<!-- - change the package folder path in variable package.dir -->
<!-- - execute this PHING build file -->
<!-- ================================================================== -->
<project name="redproducfinder_full_packager" default="pack">
<!-- ============================================ -->
<!-- Create packages folder -->
<!-- ============================================ -->
<target name="prepare">
<echo msg="###################### prepare first ######################"/>
<if>
<not>
<isset property="package.dir" />
</not>
<then>
<fail msg="package.dir not specified, specify package.dir in build.properties file" />
</then>
</if>
<!-- Folder where redPRODUCTFINDER repository is located -->
<property
name="extpath"
value="."
override="true"/>
<xmlproperty file="${extpath}/${extension}.xml" prefix="extensionDetails" keepRoot="false" />
<property
name="version"
value="${extensionDetails.version}"
override="true"/>
<!-- Temp dir to create packages -->
<property
name="tmpdir"
value=".dist"
override="true"/>
<!-- Check if the temp folder exists. If not, create it -->
<if>
<available file="${tmpdir}" type="dir"/>
<then>
<echo msg="Removing old ${tmpdir}"/>
<delete dir="${tmpdir}"/>
</then>
</if>
<echo msg="Making directory to store the temporary packages at ${tmpdir}"/>
<mkdir dir="${tmpdir}"/>
</target>
<target name="build" depends="prepare">
<echo msg="###################### build ######################"/>
<phing phingfile="${project.basedir}/extension_packager.xml" target="autopack"
haltonfailure="true">
<property name="package.delete" value="false" />
</phing>
<phing phingfile="${project.basedir}/modules_packager.xml" target="autopack"
haltonfailure="true">
<property name="package.delete" value="false" />
</phing>
<phing phingfile="${project.basedir}/plugins_packager.xml" target="autopack"
haltonfailure="true">
<property name="package.delete" value="false" />
</phing>
<echo msg="Creating full ZIP package..." />
<zip destfile="${package.dir}/${extension}-v${version}_fullpackage-unzipfirst.zip">
<fileset dir="${tmpdir}">
<include name="**" />
<exclude name=".*" />
</fileset>
</zip>
<delete dir="${tmpdir}/${extension}-${version}-plugins" />
<delete dir="${tmpdir}/${extension}-${version}-modules" />
<delete file="${tmpdir}/${extension}-v${version}_${joomla.version}.zip" />
</target>
<target name="dist" depends="build">
<echo msg="Build successful!"/>
</target>
<target name="pack">
<!-- Do initialization stuff -->
<if>
<not>
<available file="build.properties" type="file" />
</not>
<then>
<fail msg="File not found: build.properties" />
</then>
</if>
<property file="build.properties" override="true"/>
<property
name="extension"
value="${comp.name}"
override="true"/>
<phingcall target="dist" />
</target>
<target name="autopack">
<property
name="package.dir"
value=".dist"
override="true"/>
<property
name="extension"
value="redproductfinder"
override="true"/>
<property
name="joomla.version"
value="j3_and_j25"
override="true"/>
<if>
<available file="${package.dir}" type="dir"/>
<then>
<echo msg="Removing old autopack folder"/>
<delete dir="${package.dir}"/>
</then>
</if>
<phingcall target="dist" />
</target>
</project>