-
Notifications
You must be signed in to change notification settings - Fork 0
/
component_packager.xml
144 lines (125 loc) · 4.56 KB
/
component_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
137
138
139
140
141
142
143
144
<?xml version="1.0" encoding="UTF-8"?>
<!-- ================================================================== -->
<!-- redSHOP packager -->
<!-- This PHING build file generates the redSHOP extension package -->
<!-- To use in your environment do the following steps: -->
<!-- Change the following variables in build.properties file -->
<!-- (copy variables from build.properties.dist ) -->
<!-- - change the version in variable comp.version -->
<!-- - change the source folder path in variable repo.dir -->
<!-- - change the package folder path in variable package.dir -->
<!-- - execute this PHING build file -->
<!-- ================================================================== -->
<project name="com_reddesign" default="dist">
<!-- Do initialization stuff -->
<property file="build.properties" override="true"/>
<property
name="extension"
value="${comp.name}"
override="true"/>
<property
name="version"
value="${comp.version}"
override="true"/>
<!-- Folder where the the extension repository is located -->
<property
name="extpath"
value="${repo.dir}"
override="true"/>
<!-- Target dir where packages will be created -->
<property
name="targetdir"
value="${package.dir}/${extension}/package-${extension}-v${version}"
override="true"/>
<!-- Version of the redSHOP for witch the module is intended to -->
<property
name="joomla_version"
value="${joomla.version}"
override="true"/>
<!-- ============================================ -->
<!-- Create packages folder -->
<!-- ============================================ -->
<target name="prepare">
<!-- Check if the target folder exists. If not, create it -->
<if>
<available file="${targetdir}" type="dir"/>
<then>
<echo msg="Removing old ${targetdir}"/>
<delete dir="${targetdir}"/>
</then>
</if>
<echo msg="Making directory to store the packages at ${targetdir}"/>
<mkdir dir="${targetdir}"/>
</target>
<!-- ============================================ -->
<!-- Target: build -->
<!-- ============================================ -->
<!-- Copy the source files to the target folder -->
<target name="build" depends="prepare">
<echo msg="Copying INSTALLER files to build directory..."/>
<copy todir="${targetdir}">
<fileset dir="${extpath}/">
<include name="LICENSE.txt"/>
<include name="reddesign.xml"/>
<include name="install.php"/>
</fileset>
</copy>
<echo msg="Copying COMPONENT folder to build directory..."/>
<copy todir="${targetdir}/component">
<fileset dir="${extpath}/component">
<include name="**"/>
<exclude name=".*"/>
</fileset>
</copy>
<echo msg="Copying MEDIA folder to build directory..."/>
<copy todir="${targetdir}/media">
<fileset dir="${extpath}/media">
<include name="**"/>
<exclude name=".*"/>
</fileset>
</copy>
<echo msg="Copying LIBRARIES folder to build directory..."/>
<copy todir="${targetdir}/libraries">
<fileset dir="${extpath}/libraries">
<include name="**"/>
<exclude name=".*"/>
</fileset>
</copy>
<echo msg="Copying PLUGINS folder to build directory..."/>
<copy todir="${targetdir}/plugins">
<fileset dir="${extpath}/plugins">
<include name="**"/>
<exclude name=".*"/>
</fileset>
</copy>
<echo msg="Copying redCORE LIBRARIES folder to build directory..."/>
<copy todir="${targetdir}/redCORE">
<fileset dir="${extpath}/redCORE">
<include name="**"/>
<exclude name=".*"/>
<exclude name="build.*"/>
<exclude name="*.md"/>
</fileset>
</copy>
</target>
<!-- ============================================ -->
<!-- (DEFAULT) Target: dist -->
<!-- ============================================ -->
<target name="dist" depends="build">
<echo msg="Creating ZIP archive..."/>
<!-- Check if the ZIP file already exists. If yes, remove it -->
<if>
<available file="${package.dir}${extension}/${extension}-v${version}_j${joomla_version}.zip" type="file"/>
<then>
<delete file="${package.dir}${extension}/${extension}-v${version}_j${joomla_version}.zip"/>
</then>
</if>
<zip destfile="${targetdir}/../${extension}-v${version}_j${joomla_version}.zip">
<fileset dir="${targetdir}">
<include name="**"/>
<exclude name=".*"/>
</fileset>
</zip>
<echo msg="Files copied and compressed in build directory OK!"/>
</target>
</project>