-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
48 lines (47 loc) · 1.7 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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="run_cmd" name="tipptop">
<property name="jruby.home" location="${basedir}/jruby-1.4.0RC2"/>
<property name="rails.env" value="development"/>
<path id="jruby.classpath">
<fileset dir="${jruby.home}/lib" includes="*.jar"/>
</path>
<target name="run">
<java fork="true" spawn="true" classname="org.jruby.Main">
<classpath refid="jruby.classpath"/>
<sysproperty key="jruby.home" value="${jruby.home}"/>
<arg value="script/server"/>
<arg value="-e${rails.env}"/>
</java>
</target>
<target name="run_cmd">
<exec executable="${jruby.home}/bin/jruby">
<arg value="script/server"/>
<arg value="-e${rails.env}"/>
</exec>
</target>
<target name="migrate">
<delete file="${basedir}/db/schema.rb"/>
<java fork="true" classname="org.jruby.Main">
<classpath refid="jruby.classpath"/>
<sysproperty key="jruby.home" value="${jruby.home}"/>
<arg value="${jruby.home}/bin/rake"/>
<arg value="RAILS_ENV=${rails.env}"/>
<arg value="db:migrate"/>
</java>
</target>
<target name="seed" depends="migrate">
<java fork="true" classname="org.jruby.Main">
<jvmarg value="-Xmx1024m -Xms512m"/>
<classpath refid="jruby.classpath"/>
<sysproperty key="jruby.home" value="${jruby.home}"/>
<arg value="${jruby.home}/bin/rake"/>
<arg value="RAILS_ENV=${rails.env}"/>
<arg value="db:seed"/>
</java>
</target>
<target name="clean" description="Cleans the database.">
<delete dir="${basedir}/tipptop_${rails.env}"/>
</target>
<target name="setup" depends="clean, seed" description="Creates a new database for the initial setup.">
</target>
</project>