forked from flagbit/Magento-FeedReader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bippo.ant.xml
131 lines (118 loc) · 7.38 KB
/
bippo.ant.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="flagbit-feedreader-bippo">
<property file="extension.properties"/>
<property file="deploy.properties"/>
<property file="development.properties"/>
<property name="app.code.community.dir" location="src/app/code/community"/>
<property name="app.design.dir" location="src/app/design"/>
<property name="skin.dir" location="src/skin"/>
<property name="app.etc.modules.dir" location="src/app/etc/modules"/>
<property name="locale.dir" location="src/app/locale"/>
<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"/>
<sshexec host="${server.host}" username="${server.user}" port="${server.port}"
keyfile="${user.home}/.ssh/id_rsa" trust="true"
command="rm -rf ${server.dir}/var/cache/*"/>
</target>
<target name="remote.compile" description="Recompile Magento includes on server.">
<fail unless="server.host"/>
<fail unless="server.port"/>
<fail unless="server.user"/>
<fail unless="server.dir"/>
<sshexec host="${server.host}" username="${server.user}" port="${server.port}"
keyfile="${user.home}/.ssh/id_rsa" trust="true"
command="php '${server.dir}/shell/compiler.php' compile"/>
</target>
<target name="deploy"
description="Deploy ${extension.name} files to ${server.user}@${server.host}:${server.dir} at port ${server.port}. Then recompile and flush.">
<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="${app.code.community.dir}/${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="${app.design.dir}/./frontend/base/default/layout/${extension.dirname}.xml"/>
<arg value="${app.design.dir}/./frontend/base/default/template/${extension.dirname}"/>
<arg value="${server.user}@${server.host}:${server.dir}/app/design" />
</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.dir}/./frontend/base/default/css/${extension.dirname}.css"/>
<arg value="${skin.dir}/./frontend/base/default/images/${extension.dirname}"/>
<arg value="${skin.dir}/./frontend/base/default/js/${extension.dirname}"/>
<arg value="${server.user}@${server.host}:${server.dir}/skin" />
</exec>
<exec executable="rsync">
<arg value="-e"/>
<arg value="ssh -p${server.port}"/>
<arg value="-vza"/>
<arg value="--delete"/>
<arg value="${app.etc.modules.dir}/${extension.module.company}_${extension.module.name}.xml"/>
<arg value="${server.user}@${server.host}:${server.dir}/app/etc/modules" />
</exec>
<antcall target="remote.compile" />
<antcall target="remote.flush" />
</target>
<target name="undeploy" description="Delete deployed files for ${extension.name} theme in ${server.host}:${server.dir}.">
<fail unless="server.user"/>
<fail unless="server.host"/>
<fail unless="server.port"/>
<fail unless="server.dir"/>
<sshexec host="${server.host}" username="${server.user}" port="${server.port}"
keyfile="${user.home}/.ssh/id_rsa" trust="true"
command="rm -rvf '${server.dir}/app/code/community/${extension.module.company}/${extension.module.name}' '${server.dir}/app/design/frontend/base/default/layout/${extension.dirname}.xml' '${server.dir}/app/design/frontend/base/default/template/${extension.dirname}' '${server.dir}/skin/frontend/base/default/css/${extension.dirname}.css' '${server.dir}/skin/frontend/base/default/images/${extension.dirname}' '${server.dir}/skin/frontend/base/default/js/${extension.dirname}' '${server.dir}/app/etc/modules/${extension.module.company}_${extension.module.name}.xml'"/>
<antcall target="remote.flush"/>
<antcall target="remote.compile"/>
</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="${app.code.community.dir}/${extension.module.company}/${extension.module.name}" failonerror="false"/>
<symlink link="${magento.dir}/app/design/frontend/base/default/layout/" resource="${app.design.dir}/frontend/base/default/layout/${extension.dirname}.xml" failonerror="false"/>
<symlink link="${magento.dir}/app/design/frontend/base/default/template/" resource="${app.design.dir}/frontend/base/default/template/${extension.dirname}" failonerror="false"/>
<symlink link="${magento.dir}/skin/frontend/base/default/css/" resource="${skin.dir}/frontend/base/default/css/${extension.dirname}.css" failonerror="false"/>
<symlink link="${magento.dir}/skin/frontend/base/default/images/" resource="${skin.dir}/frontend/base/default/images/${extension.dirname}" failonerror="false"/>
<symlink link="${magento.dir}/skin/frontend/base/default/js/" resource="${skin.dir}/frontend/base/default/js/${extension.dirname}" failonerror="false"/>
<copy file="${app.etc.modules.dir}/${extension.module.company}_${extension.module.name}.xml" todir="${magento.dir}/app/etc/modules/" verbose="true"/>
</target>
<target name="symlink.delete" description="Delete symlinks to ${extension.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/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>