forked from dioscouri/mysite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
110 lines (94 loc) · 4.83 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
An ant build file for joomla install packages
@author Dioscouri Design
@link http://www.dioscouri.com
@copyright Copyright (C) 2007 Dioscouri Design. All rights reserved.
@license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
-->
<project name="mysite-joomla" default="build" basedir=".">
<description>Ant Build File for Joomla</description>
<!-- load variables from config file -->
<property name="cfg.configFile" location="antconfig.txt" />
<loadproperties srcfile="${cfg.configFile}" />
<!--config file values
cfg.name=cmslayer
cfg.buildDir=packages
cfg.localhostRoot=c:/www
ftp.server=
ftp.user=
ftp.password=
ftp.dir=
-->
<!-- auto values but should be checked -->
<property name="cfg.comName" value="${cfg.name}" />
<property name="cfg.comDir" value="${basedir}/${cfg.comName}" />
<property name="cfg.buildVersionDir" value="${cfg.buildDir}" />
<property name="cfg.plgPrefix" value="cmslayer_plugin_" />
<property name="cfg.modPrefix" value="mod_cmslayer_" />
<property name="cfg.langPrefix" value="cmslayer_translation_" />
<property name="cfg.langDir" value="${basedir}/language_packages" />
<property name="cfg.adminFilesDir" location="${cfg.comDir}/admin" />
<property name="cfg.siteFilesDir" location="${cfg.comDir}/site" />
<property name="cfg.extensionsDir" location="${basedir}/extensions" />
<property name="cfg.mediaFilesDir" location="${cfg.comDir}/media" />
<property name="cfg.adminLangDir" location="${cfg.comDir}/languages/admin" />
<property name="cfg.siteLangDir" location="${cfg.comDir}/languages/site" />
<!-- some settings that are currently unused -->
<property name="cfg.addversion" value="true" />
<property name="cfg.versionprefix" value="v" />
<property name="cfg.adddate" value="true" />
<property name="cfg.datefmt" value="yyyy-MM-dd" />
<property name="cfg.dateloc" value="en,UK" />
<target name="update_localhost" description="attemps to update files on localhost server with files from working directory">
<!-- MAIN COMPONENT -->
<copy todir="${cfg.localhostRoot}/administrator/components/com_${cfg.comName}" overwrite="true">
<fileset dir="${cfg.adminFilesDir}" />
</copy>
<copy todir="${cfg.localhostRoot}/components/com_${cfg.comName}" overwrite="true">
<fileset dir="${cfg.siteFilesDir}" />
</copy>
<copy todir="${cfg.localhostRoot}/administrator/components/com_${cfg.comName}" overwrite="true">
<fileset file="${cfg.comDir}/manifest.xml" />
</copy>
<!-- MEDIA FILES -->
<copy todir="${cfg.localhostRoot}/media/com_${cfg.comName}" overwrite="true">
<fileset dir="${cfg.mediaFilesDir}" />
</copy>
<!-- LANGUAGE FILES -->
<copy todir="${cfg.localhostRoot}/administrator/language/en-GB" overwrite="true">
<fileset dir="${cfg.adminLangDir}" />
</copy>
<copy todir="${cfg.localhostRoot}/language/en-GB" overwrite="true">
<fileset dir="${cfg.siteLangDir}" />
</copy>
</target>
<target name="clean" description="Destroys all generated files and dirs">
<delete dir="${cfg.buildDir}/plugins" />
<delete dir="${cfg.buildDir}/modules" />
<delete dir="${cfg.buildDir}/components" />
<delete dir="${cfg.buildDir}/languages" />
</target>
<target name="init" description="creates necessary directory to build with">
<mkdir dir="${cfg.buildDir}" />
<mkdir dir="${cfg.buildDir}/plugins" />
<mkdir dir="${cfg.buildDir}/modules" />
<mkdir dir="${cfg.buildDir}/components" />
<mkdir dir="${cfg.buildDir}/languages" />
</target>
<target name="build" depends="build_packages" />
<target name="build_packages" depends="clean, init, build_component, build_modules, build_plugins, build_languages" />
<target name="build_component" depends="init" description="packages the final component file">
<zip destfile="${cfg.buildDir}/components/${cfg.name}.zip" basedir="${cfg.comDir}" />
</target>
<target name="build_plugins" description="packages any plugins">
<!-- add all plugin directories here -->
<!-- EX: <zip destfile="${cfg.buildDir}/plugins/${cfg.plgPrefix}report_ambrafields.zip" basedir="${cfg.comDir}/${cfg.plgPrefix}report_ambrafields" /> -->
</target>
<target name="build_modules" description="packages any modules">
<!-- add all module directories here -->
<!-- EX: <zip destfile="${cfg.buildDir}/modules/${cfg.modPrefix}module.zip" basedir="${cfg.comDir}/${cfg.plgPrefix}module" /> -->
</target>
<target name="build_languages" depends="init" description="packages any languages">
</target>
</project>