This repository has been archived by the owner on Aug 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
120 lines (115 loc) · 3.2 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
111
112
113
114
115
116
117
118
119
120
<?xml version="1.0"?>
<project name="Vertaal" default="build" basedir=".">
<!-- makemessages -a -e html -e mail -->
<!--
<target name="update_locale">
<exec executable="/usr/bin/python">
<arg value="manage.py"/>
<arg value="makemessages"/>
<arg value="-a"/>
<arg value="-e html"/>
<arg value="-e mail"/>
</exec>
</target>
-->
<target name="compile_locale">
<exec executable="/usr/bin/python">
<arg value="${dest}/manage.py"/>
<arg value="compilemessages"/>
</exec>
</target>
<target name="hudson">
<antcall target="build">
<param name="dest" value="${env.DEST}"/>
</antcall>
</target>
<target name="hudson-locales">
<antcall target="buid-locale">
<param name="dest" value="${env.DEST}"/>
</antcall>
</target>
<target name="buid-locale">
<antcall target="compile_locale"></antcall>
<copy overwrite="true" verbose="true" todir="${dest}/locale" includeemptydirs="false">
<fileset dir="./locale">
<exclude name=".svn"/>
<exclude name=".git"/>
</fileset>
</copy>
<echo message="Reload"/>
<touch file="${dest}/../apache/django.wsgi"/>
<echo message="Finished."/>
</target>
<target name="build">
<echo message="Deploying to ${dest}..."/>
<!--
<copy overwrite="true" verbose="true" todir="${dest}" includeemptydirs="false">
<fileset dir=".">
<exclude name=".svn"/>
<exclude name="*.pyc"/>
<exclude name="settings_local.py"/>
</fileset>
</copy>
-->
<!-- COMPILE LOCALE FIRST BECAUSE IT IS EXECUTED ON THE WORKSPACE PATH -->
<antcall target="compile_locale"></antcall>
<sync todir="${dest}" includeemptydirs="false" verbose="true" overwrite="true">
<fileset dir=".">
<exclude name=".project"/>
<exclude name=".pydevproject"/>
<exclude name=".svn"/>
<exclude name=".git"/>
<exclude name="*.pyc"/>
<exclude name="settings_local.py"/>
</fileset>
<preserveintarget>
<include name="settings_local.py"/>
<include name="**/media/**"/>
</preserveintarget>
</sync>
<echo message="Setting up environment..."/>
<exec executable="/usr/bin/python">
<arg value="-mcompileall"/>
<arg value="${dest}"/>
</exec>
<!--
<exec executable="/usr/bin/python">
<arg value="${dest}/manage.py"/>
<arg value="cleanup"/>
</exec>
-->
<exec executable="/usr/bin/python">
<arg value="${dest}/manage.py"/>
<arg value="syncdb"/>
<arg value="--noinput"/>
</exec>
<exec executable="/usr/bin/python">
<arg value="${dest}/manage.py"/>
<arg value="evolve"/>
<!-- arg value="- -hint"/-->
<arg value="--execute"/>
<arg value="--noinput"/>
</exec>
<exec executable="/usr/bin/python">
<arg value="${dest}/update.py"/>
</exec>
<!--
<echo message="Reload apache"/>
<exec executable="/etc/init.d/apache2">
<arg value="reload"/>
</exec>
-->
<exec executable="/usr/bin/python">
<arg value="${dest}/manage.py"/>
<arg value="collectstatic"/>
<arg value="--noinput"/>
</exec>
<echo message="Reload."/>
<exec executable="/usr/bin/python">
<arg value="${dest}/reload.py"/>
<arg value="${dest}/../apache/django.wsgi"/>
</exec>
<!-- touch file="${dest}/../apache/django.wsgi"/-->
<echo message="Finished."/>
</target>
</project>