forked from alita/magento-id
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
36 lines (31 loc) · 1.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="magento-id">
<property file="development.properties"/>
<property file="deploy.properties"/>
<target name="deploy"
description="Deploy translation pack files to $server config. Useful during development.">
<exec executable="rsync">
<arg value="-e"/><arg value="ssh -p${server.port}"/>
<arg value="-vza"/>
<arg value="app"/>
<arg value="${server.user}@${server.host}:${server.dir}/"/>
</exec>
<antcall target="remote.flush"/>
</target>
<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="symlink.create" description="Create symlink 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."/>
<symlink link="${magento.dir}/app/locale/" resource="${basedir}/app/locale/id_ID" failonerror="false"/>
</target>
<target name="symlink.delete" description="Delete symlinks 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/locale/id_ID" failonerror="false"/>
</target>
</project>