forked from semuconsulting/pyubx2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
72 lines (72 loc) · 2.59 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
<?xml version = "1.0"?>
<project name="pyubx2" default="build">
<condition property="python" value="python" else="/Library/Frameworks/Python.framework/Versions/3.9/bin/python3">
<os family="windows" />
</condition>
<property name="version" value="0.3.2" />
<property name="test_args" value="tests/testsuite.py" />
<property name="analyse_args" value="-m pylint --reports=y ${ant.project.name}" />
<property name="format_args" value="-m black ${ant.project.name}" />
<property name="build_args" value="setup.py sdist bdist_wheel" />
<property name="deploy_args" value="-m twine upload --config-file .pypirc dist/*" />
<property name="install_args" value="-m pip install dist/${ant.project.name}-${version}.tar.gz --user --force-reinstall" />
<property name="coverage_args" value="-m coverage run --source=${ant.project.name} -m pytest" />
<property name="coverage_html_args" value="-m coverage html" />
<target name="clean">
<echo>Cleaning...</echo>
<delete includeEmptyDirs="true" quiet="true" failonerror="false">
<fileset dir="build" />
<fileset dir="dist" />
<fileset dir="htmlcov" />
<fileset dir=".pytest_cache" />
<fileset dir="${ant.project.name}.egg-info/" />
<fileset dir="${ant.project.name}-*/" />
<fileset dir="${ant.project.name}/__pycache__" includes="*.nbc, *.nbi, *.pyc" />
</delete>
</target>
<target name="analyse" depends="clean">
<echo>Analysing...</echo>
<exec executable="${python}">
<arg line="${analyse_args}" />
</exec>
</target>
<target name="format" depends="analyse">
<echo>Formatting...</echo>
<exec executable="${python}">
<arg line="${format_args}" />
</exec>
</target>
<target name="build" depends="format">
<echo>Building...</echo>
<exec executable="${python}">
<arg line="${build_args}" />
</exec>
</target>
<target name="test" depends="build">
<echo>Testing...</echo>
<exec executable="${python}">
<arg line="${test_args}" />
</exec>
</target>
<target name = "deploy" depends="test">
<echo>Deploying...</echo>
<exec executable="${python}">
<arg line="${deploy_args}"/>
</exec>
</target>
<target name = "install_locally" depends="test">
<echo>Installing Locally...</echo>
<exec executable="${python}">
<arg line="${install_args}"/>
</exec>
</target>
<target name = "coverage" depends="install_locally">
<echo>Testing Coverage...</echo>
<exec executable="${python}">
<arg line="${coverage_args}"/>
</exec>
<exec executable="${python}">
<arg line="${coverage_html_args}"/>
</exec>
</target>
</project>