-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
28 lines (24 loc) · 899 Bytes
/
build.xml
File metadata and controls
28 lines (24 loc) · 899 Bytes
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
<?xml version="1.0" encoding="utf-8"?>
<project name="trekk-tester" default="deploy">
<tstamp>
<format property="NOW" pattern="%Y%m%d%H%M%S" />
</tstamp>
<property name="source_dir" value="./" />
<property name="build_destination" value="/opt/jenkins/trekk_tester_builds_${NOW}" />
<property name="web_dir" value="/var/www/trekk-tester" />
<taskdef name="symlink" classname="phing.tasks.ext.SymlinkTask" />
<target name="build">
<!-- copy checkout into our build directory -->
<copy todir="${build_destination}">
<fileset dir="${source_dir}">
<exclude name=".git" />
<exclude name=".git/**" />
<exclude name="build.xml" />
</fileset>
</copy>
</target>
<target name="deploy" depends="build">
<delete file="${web_dir}/htdocs" />
<symlink target="${build_destination}" link="${web_dir}/htdocs" />
</target>
</project>