-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
140 lines (120 loc) · 4.85 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
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
<?xml version="1.0" encoding="UTF-8"?>
<!--~
~ @package FOF
~ @copyright Copyright (c)2010-2023 Nicholas K. Dionysopoulos / Akeeba Ltd
~ @license GNU General Public License version 3, or later
-->
<project name="FrameworkOnFramework" description="Framework-on-Framework for Joomla!" default="all" >
<import file="${phing.dir}/../../buildfiles/phing/common.xml" />
<!-- Default properties, set only if not already assigned in the build.properties file -->
<property name="dirs.library" value="${dirs.root}/fof" />
<!--
====================================================================================================
Tasks - General
====================================================================================================
-->
<target name="all" description="Makes everything"
depends="git">
</target>
<target name="documentation" description="No documentation in the repository">
</target>
<target name="git" description="Makes only the library package"
depends="new-release,setup-properties,library-package,package-plugin">
</target>
<!--
====================================================================================================
Tasks - Joomla! packages
====================================================================================================
-->
<target name="library-package" description="FOF Installation Package for Joomla! 1.6+"
depends="new-release,setup-properties">
<!-- Generate XML file for FOF -->
<copy file="templates/file_fof40.xml" tofile="${dirs.root}/file_fof40.xml" overwrite="true">
<filterchain>
<replacetokens begintoken="##" endtoken="##">
<token key="DATE" value="${build.date}" />
<token key="VERSION" value="${version}" />
</replacetokens>
</filterchain>
</copy>
<copy file="${dirs.root}/file_fof40.xml" tofile="${dirs.library}/file_fof40.xml" overwrite="true" />
<!-- Generate version.txt file for FOF -->
<copy file="./templates/version.txt" tofile="${dirs.library}/version.txt" overwrite="true">
<filterchain>
<replacetokens begintoken="##" endtoken="##">
<token key="DATE" value="${build.date}" />
<token key="VERSION" value="${version}" />
</replacetokens>
</filterchain>
</copy>
<!-- Generate include file for FOF -->
<copy file="./templates/include.php" tofile="${dirs.library}/include.php" overwrite="true">
<filterchain>
<replacetokens begintoken="##" endtoken="##">
<token key="DATE" value="${build.date}" />
<token key="VERSION" value="${version}" />
</replacetokens>
</filterchain>
</copy>
<!-- Create the package -->
<zipme basedir="${dirs.library}" prefix="fof/" destfile="${dirs.release}/lib_fof40-${version}.zip" includeemptydirs="true">
<fileset dir="${dirs.library}" id="library">
<include name="**" />
<exclude name="script.fof.php" />
</fileset>
</zipme>
<zipme basedir="${dirs.library}" destfile="${dirs.release}/lib_fof40-${version}.zip" includeemptydirs="true">
<fileset dir="${dirs.library}">
<include name="script.fof.php" />
</fileset>
</zipme>
<zipme basedir="${dirs.root}" destfile="${dirs.release}/lib_fof40-${version}.zip" includeemptydirs="true">
<fileset dir="${dirs.root}">
<include name="file_fof40.xml" />
</fileset>
</zipme>
<!-- Clean up -->
<delete>
<fileset dir="${dirs.root}">
<include name="file_fof40.xml" />
</fileset>
</delete>
</target>
<target name="package-plugin" description="FOF Token plugin">
<zipme basedir="${dirs.root}/plugins/user/foftoken" destfile="${dirs.release}/plg_user_foftoken-${version}.zip" includeemptydirs="true">
<fileset dir="${dirs.root}/plugins/user/foftoken">
<include name="**" />
</fileset>
</zipme>
</target>
<!--
====================================================================================================
Tasks - Project management
====================================================================================================
-->
<!--
Symlink the library to a Joomla! installation
site Absolute filesystem path to the Joomla! installation
-->
<target name="relink" description="Project relinker">
<!-- Initialize the site variable if it's not set -->
<if>
<equals arg1="${site}" arg2="" />
<then>
<property name="site" value="${build.relink_site}" override="true" />
</then>
</if>
<!-- FOF library and language files -->
<link target="${dirs.root}/fof"
link="${site}/libraries/fof40"
type="symlink" />
<link target="${dirs.root}/fof/language/en-GB/en-GB.lib_fof40.ini"
link="${site}/language/en-GB/en-GB.lib_fof40.ini"
type="symlink" />
<link target="${dirs.root}/fof/language/en-GB/en-GB.lib_fof40.ini"
link="${site}/administrator/language/en-GB/en-GB.lib_fof40.ini"
type="symlink" />
<!-- User plugin -->
<relinksite site="${site}" repository="${dirs.root}" />
</target>
</project>