This repository has been archived by the owner on Dec 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
104 lines (96 loc) · 5.61 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="bippo-jquery">
<property file="extension.properties"/>
<property file="deploy.properties"/>
<property file="development.properties"/>
<fail unless="extension.name"/>
<fail unless="extension.dirname"/>
<fail unless="extension.module.company"/>
<fail unless="extension.module.name"/>
<target name="remote.flush" description="Flush Magento cache storage on server.">
<fail unless="server.host"/>
<fail unless="server.port"/>
<fail unless="server.user"/>
<fail unless="server.dir"/>
<exec executable="ssh">
<arg value="-p"/>
<arg value="${server.port}"/>
<arg value="${server.user}@${server.host}"/>
<arg value="rm -rf ${server.dir}/var/cache/*" />
</exec>
</target>
<target name="deploy"
description="Deploy ${extension.name} files to ${server.user}@${server.host}:${server.dir} at port ${server.port}. Useful during development.">
<fail unless="server.user"/>
<fail unless="server.host"/>
<fail unless="server.port"/>
<fail unless="server.dir"/>
<exec executable="ssh">
<arg value="-p"/>
<arg value="${server.port}"/>
<arg value="${server.user}@${server.host}"/>
<arg value="mkdir -vp ${server.dir}/app/code/community/${extension.module.company}" />
</exec>
<exec executable="rsync">
<arg value="-e"/>
<arg value="ssh -p${server.port}"/>
<arg value="-vza"/>
<arg value="--delete"/>
<arg value="code/${extension.module.company}/${extension.module.name}"/>
<arg value="${server.user}@${server.host}:${server.dir}/app/code/community/${extension.module.company}" />
</exec>
<exec executable="rsync">
<arg value="-e"/>
<arg value="ssh -p${server.port}"/>
<arg value="-vza"/>
<arg value="--relative"/>
<arg value="--delete"/>
<arg value="design/frontend/base/default/layout/${extension.dirname}.xml"/>
<arg value="design/frontend/base/default/template/${extension.dirname}"/>
<arg value="${server.user}@${server.host}:${server.dir}/app" />
</exec>
<exec executable="rsync">
<arg value="-e"/>
<arg value="ssh -p${server.port}"/>
<arg value="-vza"/>
<arg value="--exclude"/><arg value="**/.dummy"/>
<arg value="--relative"/>
<arg value="--delete"/>
<arg value="skin/frontend/base/default/css/${extension.dirname}.css"/>
<arg value="skin/frontend/base/default/images/${extension.dirname}"/>
<arg value="skin/frontend/base/default/js/${extension.dirname}"/>
<arg value="${server.user}@${server.host}:${server.dir}" />
</exec>
<exec executable="rsync">
<arg value="-e"/>
<arg value="ssh -p${server.port}"/>
<arg value="-vza"/>
<arg value="--delete"/>
<arg value="${extension.module.company}_${extension.module.name}.xml"/>
<arg value="${server.user}@${server.host}:${server.dir}/app/etc/modules" />
</exec>
<antcall target="remote.flush" />
</target>
<target name="symlink.create" description="Create symlinks to ${extension.name} theme in ${magento.dir}. It will not overwrite existing files/links.">
<fail unless="magento.dir" message="Please set 'magento.dir' property to your Magento installation folder."/>
<mkdir dir="${magento.dir}/app/code/community/${extension.module.company}"/>
<symlink link="${magento.dir}/app/code/community/${extension.module.company}/" resource="${basedir}/code/${extension.module.company}/${extension.module.name}" failonerror="false"/>
<symlink link="${magento.dir}/app/design/frontend/base/default/layout/" resource="${basedir}/design/frontend/base/default/layout/${extension.dirname}.xml" failonerror="false"/>
<symlink link="${magento.dir}/app/design/frontend/base/default/template/" resource="${basedir}/design/frontend/base/default/template/${extension.dirname}" failonerror="false"/>
<symlink link="${magento.dir}/skin/frontend/base/default/css/" resource="${basedir}/skin/frontend/base/default/css/${extension.dirname}.css" failonerror="false"/>
<symlink link="${magento.dir}/skin/frontend/base/default/images/" resource="${basedir}/skin/frontend/base/default/images/${extension.dirname}" failonerror="false"/>
<symlink link="${magento.dir}/skin/frontend/base/default/js/" resource="${basedir}/skin/frontend/base/default/js/${extension.dirname}" failonerror="false"/>
<copy file="${extension.module.company}_${extension.module.name}.xml" todir="${magento.dir}/app/etc/modules/" />
</target>
<target name="symlink.delete" description="Delete symlinks to ${theme.name} theme in ${magento.dir}. It will only delete files or symlinks, not directories.">
<fail unless="magento.dir" message="Please set 'magento.dir' property to your Magento installation folder."/>
<symlink action="delete" link="${magento.dir}/app/code/community/${extension.module.company}/${extension.module.name}" failonerror="false"/>
<symlink action="delete" link="${magento.dir}/app/code/community/${extension.module.company}/${extension.module.name}" failonerror="false"/>
<symlink action="delete" link="${magento.dir}/app/design/frontend/base/default/layout/${extension.dirname}.xml" failonerror="false"/>
<symlink action="delete" link="${magento.dir}/app/design/frontend/base/default/template/${extension.dirname}" failonerror="false"/>
<symlink action="delete" link="${magento.dir}/skin/frontend/base/default/css/${extension.dirname}.css" failonerror="false"/>
<symlink action="delete" link="${magento.dir}/skin/frontend/base/default/images/${extension.dirname}" failonerror="false"/>
<symlink action="delete" link="${magento.dir}/skin/frontend/base/default/js/${extension.dirname}" failonerror="false"/>
<delete file="${magento.dir}/app/etc/modules/${extension.module.company}_${extension.module.name}.xml" />
</target>
</project>