-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
74 lines (62 loc) · 3.13 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
<?xml version="1.0" ?>
<project name="taggart" default="test" basedir=".">
<property name="verbosity" value="1" />
<property file="build-user.properties" />
<condition property="isMac">
<os family="mac" />
</condition>
<condition property="isUnix">
<os family="unix" />
</condition>
<condition property="isWindows">
<os family="windows" />
</condition>
<target name="detect-mac" if="isMac">
<property name="environment" value="posix" />
</target>
<target name="detect-unix" if="isUnix">
<property name="environment" value="posix" />
</target>
<target name="detect-windows" if="isWindows">
<property name="environment" value="windows" />
</target>
<target name="configure-properties" depends="detect-mac, detect-unix, detect-windows">
<echo message="Using ${environment} environment..." />
<copy file="${basedir}/build-user.properties.${environment}" tofile="${basedir}/build-user.properties" overwrite="false" />
<property file="${basedir}/build-user.properties" />
</target>
<target name="bootstrap" depends="configure-properties" description="Automatically set up a virtual environment fit for developing Taggart">
<exec executable="./bootstrap.bash" dir="${basedir}" failonerror="true" />
</target>
<target name="configure" depends="configure-properties" description="Configure the working directory for building and testing Taggart" />
<target name="build" depends="configure-properties" description="Perform a full build of the project">
<exec executable="${python.executable}" dir="${basedir}" failonerror="true">
<arg line="setup.py build" />
</exec>
</target>
<target name="test-python" depends="configure-properties">
<exec executable="${nose.executable}" dir="${basedir}" failonerror="true" />
<exec executable="${flake8.executable}" dir="${basedir}" failonerror="true" />
<exec executable="${pep257.executable}" dir="${basedir}" failonerror="true" />
</target>
<target name="test" depends="test-python" description="Run all unit and integration tests" />
<target name="dist" depends="configure-properties" description="Generate a pip-installable PyPI package">
<exec executable="${python.executable}" dir="${basedir}" failonerror="true">
<arg line="setup.py sdist" />
</exec>
</target>
<target name="deploy" depends="dist" description="Distribute a pip-installable PyPI package">
<!-- The deploy target should usually deploy the artifact generated by dist to a PyPI server -->
</target>
<target name="clean" description="Clean the working directory for building and testing Taggart from a fresh state">
<delete dir="build" verbose="true" />
<delete dir="dist" verbose="true" />
<delete file=".coverage" verbose="true" />
<delete file="MANIFEST" verbose="true" />
<delete verbose="true">
<fileset dir="${basedir}" casesensitive="no">
<filename name="**/*.pyc" />
</fileset>
</delete>
</target>
</project>