-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
52 lines (46 loc) · 1.8 KB
/
build.xml
File metadata and controls
52 lines (46 loc) · 1.8 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Athenia Angular Web App">
<tstamp>
<format property="buildtimestamp" pattern="yyyyMMddHHmmss"/>
</tstamp>
<target name="jenkins"
depends="npm-install,ng-test"
description="Performs the jenkins build/install"/>
<target name="ng-test">
<delete dir="${basedir}/coverage"/>
<delete dir="${basedir}/test-results" />
<exec executable="/usr/bin/npm" dir="${basedir}" failonerror="true">
<arg value="run" />
<arg value="test-headless" />
</exec>
</target>
<target name="deploy"
depends="npm-install,ng-build,link-new-build"
description="Performs the deploy for the terminal application."/>
<target name="npm-install">
<exec executable="/usr/bin/npm" failonerror="true" dir="${basedir}">
<arg value='install' />
</exec>
</target>
<target name="ng-build">
<exec executable="/usr/bin/ng" failonerror="true" dir="${basedir}">
<arg value='build' />
<arg value='--prod' />
</exec>
</target>
<target name="link-new-build">
<move file="${basedir}/dist/current" toFile="${basedir}/dist/${buildtimestamp}" />
<symlink link="${basedir}/public" resource="${basedir}/dist/${buildtimestamp}" overwrite="true"/>
<!-- just a note - this will fail if there is not at least 2 directories but that's ok for now -->
<delete verbose="true">
<allbutlast count="2">
<sort>
<date/>
<resources>
<dirset dir="${basedir}/dist" includes="*" />
</resources>
</sort>
</allbutlast>
</delete>
</target>
</project>