-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
132 lines (124 loc) · 4.57 KB
/
build.xml
File metadata and controls
132 lines (124 loc) · 4.57 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<project name="SuperSCAD" default="build" basedir=".">
<taskdef name="readSemanticVersion" classname="\SetBased\Phing\Task\ReadSemanticVersionTask"/>
<property name="BUILD_DIR" value="./build"/>
<!-- Run composer update and executes various other updates -->
<target name="composer-update">
<exec executable="composer" checkreturn="true" passthru="true">
<arg value="update"/>
</exec>
</target>
<!-- Install virtual environment -->
<target name="venv">
<exec executable="python3" checkreturn="true" passthru="true">
<arg value="-m"/>
<arg value="venv"/>
<arg value=".venv"/>
</exec>
<exec executable="./.venv/bin/python" checkreturn="true" passthru="true">
<arg value="-m"/>
<arg value="pip"/>
<arg value="install"/>
<arg value="--upgrade"/>
<arg value="pip"/>
</exec>
<exec executable="./.venv/bin/python" checkreturn="true" passthru="true">
<arg value="-m"/>
<arg value="pip"/>
<arg value="install"/>
<arg value="--upgrade"/>
<arg value="poetry"/>
</exec>
<exec executable="./.venv/bin/poetry" passthru="true" checkreturn="true">
<arg value="--ansi"/>
<arg value="lock"/>
</exec>
<exec executable="./.venv/bin/poetry" passthru="true" checkreturn="true">
<arg value="--ansi"/>
<arg value="install"/>
<arg value="--no-root"/>
</exec>
<exec executable="./.venv/bin/poetry" passthru="true" checkreturn="true">
<arg value="--ansi"/>
<arg value="show"/>
<arg value="--outdated"/>
</exec>
</target>
<!-- Creates a new version/release. -->
<!-- @todo replace semantic version with pep-396 -->
<target name="version">
<readSemanticVersion file=".version"
versionProperty="VERSION"
haltOnError="true"/>
<reflexive>
<fileset dir=".">
<include name="pyproject.toml"/>
</fileset>
<filterchain>
<replaceregexp>
<regexp pattern="version = .*" replace="version = "${VERSION}""/>
</replaceregexp>
</filterchain>
</reflexive>
<exec executable="git" checkreturn="true" passthru="true">
<arg value="commit"/>
<arg value="-a"/>
<arg value="-m"/>
<arg value="Release: ${VERSION}"/>
</exec>
<exec executable="git" checkreturn="true" passthru="true">
<arg value="push"/>
</exec>
<exec executable="git" checkreturn="true" passthru="true">
<arg value="tag"/>
<arg value="${VERSION}"/>
</exec>
<exec executable="git" checkreturn="true" passthru="true">
<arg value="push"/>
<arg value="origin"/>
<arg value="${VERSION}"/>
</exec>
</target>
<!-- Creates a new distribution using pyproject.toml -->
<target name="dist">
<exec executable="./.venv/bin/poetry" passthru="true" checkreturn="true">
<arg value="build"/>
</exec>
</target>
<!-- Uploads a distribution to PyPI -->
<target name="upload">
<exec executable="./.venv/bin/poetry" passthru="true" checkreturn="true">
<arg value="publish"/>
</exec>
</target>
<!-- All steps for releasing a new version -->
<target name="release" depends="version,dist,upload"/>
<!-- Runs all unit tests-->
<target name="unit">
<exec executable="./.venv/bin/python" checkreturn="true" passthru="true">
<arg value="-m"/>
<arg value="coverage"/>
<arg value="run"/>
<arg value="-m"/>
<arg value="unittest"/>
<arg value="discover"/>
<arg value="-s"/>
<arg value="test"/>
<arg value="-p"/>
<arg value="\*Test.py"/>
</exec>
<exec executable="./.venv/bin/python" checkreturn="true" passthru="true">
<arg value="-m"/>
<arg value="coverage"/>
<arg value="html"/>
</exec>
<delete>
<fileset dir="test">
<include name="**/*.actual.scad"/>
</fileset>
</delete>
</target>
<!-- Default target -->
<target name="build">
<echo msg="And Now for Something Completely Different"/>
</target>
</project>