forked from firegento/firegento-germansetup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
87 lines (79 loc) · 3.39 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Firegento_GermanSetup Deployment" default="deploy" basedir=".">
<property file="${basedir}/build.properties" />
<property file="${basedir}/build.default.properties" />
<property name="srcdir" value="${basedir}/src"/>
<property name="targetdir" value="${dev.local.deployDir}"/>
<target name="prepare">
<replaceregexp file="${basedir}/package.xml"
match="(<version>.*?<(release)>).*?(</\2>.*?<(api)>).*?(</\4>.*?</version>)"
replace="\1${package.version}\3${package.version}\5" flags="gs" />
</target>
<target name="package" depends="prepare" description="Creates a PEAR package">
<copy file="${basedir}/package.xml" tofile="${srcdir}/package.xml"/>
<exec dir='${srcdir}/' executable="${pear}">
<arg value="mpx"/>
</exec>
<copy file="${srcdir}/package.xml" tofile="${basedir}/package.xml"/>
<exec dir="${srcdir}" executable="${pear}">
<arg value="mage-package"/>
</exec>
<delete file="${srcdir}/package.xml"/>
<move file="${srcdir}/${ant.project.name}-${package.version}.tgz" todir="${builddir}"/>
</target>
<target name="clean">
<delete file="${basedir}/cache.properties" failonerror="false" />
</target>
<target name="deploy">
<copy todir="${targetdir}" overwrite="yes" verbose="yes">
<fileset dir="src/">
<modified>
<param name="cache.cachefile" value="dev.cache.properties"/>
</modified>
<exclude name="**/.svn" />
</fileset>
</copy>
</target>
<target name="deploy_to_dev">
<antcall target="deploy_scp">
<param name="ssh.user" value="${dev.ssh.user}"/>
<param name="ssh.keyfile" value="${dev.ssh.keyfile}"/>
<param name="ssh.passphrase" value="${dev.ssh.passphrase}"/>
<param name="ssh.server" value="${dev.ssh.server}"/>
<param name="ssh.path" value="${dev.ssh.path}"/>
<param name="ssh.cache" value="${dev.ssh.cache}"/>
</antcall>
</target>
<target name="deploy_scp">
<scp
todir="${ssh.user}@${ssh.server}:${ssh.path}"
keyfile="${ssh.keyfile}"
passphrase="${ssh.passphrase}"
trust="true"
verbose="true"
>
<fileset dir="src/">
<include name="**/*"/>
<modified>
<param name="cache.cachefile" value="${ssh.cache}.cache.properties"/>
</modified>
<exclude name="**/.svn"/>
<exclude name=".buildpath"/>
<exclude name=".project"/>
<exclude name=".settings/**"/>
<exclude name=".cache/**"/>
<exclude name="webserver/**"/>
<exclude name=".externalToolBuilders/**"/>
<exclude name="downloader/**"/>
<exclude name="pear"/>
<exclude name="*cache.properties"/>
<exclude name="build.default.properties"/>
<exclude name="build.properties"/>
<exclude name="build.xml"/>
<exclude name="TODO"/>
<exclude name="var/**" />
<exclude name="Thumbs.db" />
</fileset>
</scp>
</target>
</project>