forked from doublespeakgames/gridland
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
73 lines (65 loc) · 2.25 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
<?xml version="1.0" encoding="utf-8"?>
<project name="Gridland">
<!-- properties -->
<property name="r.js" value="tools/r.js" />
<property name="closure.jar" value="tools/compiler.jar" />
<property name="rhino.jar" value="tools/js.jar" />
<property name="build.js" value="tools/build.js" />
<property name="build.dir" value="build" />
<property name="deploy.path" value="D:\Users\Michael!\Documents\Gridland" />
<property name="publish.server" value="www.doublespeakgames.com" />
<property name="publish.path" value="/var/www/html/gridland" />
<property name="publish.user" value="ec2-user" />
<property name="publish.key" value="D:\Users\Michael!\Documents\Michael.pem" />
<target name="all" depends="build,deploy" />
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="build" depends="clean">
<java classname="org.mozilla.javascript.tools.shell.Main">
<classpath>
<pathelement location="${rhino.jar}" />
<pathelement location="${closure.jar}" />
</classpath>
<arg value="${r.js}" />
<arg value="-o" />
<arg value="${build.js}" />
</java>
</target>
<target name="deploy">
<delete includeemptydirs="true">
<fileset dir="${deploy.path}" includes="**/*" />
</delete>
<copy todir="${deploy.path}">
<fileset dir="${build.dir}">
<include name="**/*.*" />
<exclude name="**/thumbs.db" />
<exclude name="img/src/*.*" />
<exclude name="img/nodeploy/*.*" />
</fileset>
</copy>
<replaceregexp file="${deploy.path}/index.html"
match="<div [^>]*nodeploy>[^<]*</div>"
replace="" byline="true"
/>
</target>
<target name="publish-all">
<scp keyfile="${publish.key}" todir="${publish.user}@${publish.server}:${publish.path}" trust="true">
<fileset dir="${deploy.path}" />
</scp>
</target>
<target name="publish-script">
<scp keyfile="${publish.key}" todir="${publish.user}@${publish.server}:${publish.path}" trust="true">
<fileset dir="${deploy.path}" >
<include name="**/*.js" />
</fileset>
</scp>
</target>
<target name="publish-style">
<scp keyfile="${publish.key}" todir="${publish.user}@${publish.server}:${publish.path}" trust="true">
<fileset dir="${deploy.path}" >
<include name="**/*.css" />
</fileset>
</scp>
</target>
</project>