-
Notifications
You must be signed in to change notification settings - Fork 224
/
makefile
52 lines (42 loc) · 1.04 KB
/
makefile
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
GIT_PORCELAIN_STATUS=$(shell git status --porcelain)
.PHONY: mypy-and-tests
mypy-and-tests: mypy run-gpxinfo test
echo "Done"
.PHONY: run-gpxinfo
run-gpxinfo:
./gpxinfo test_files/*gpx
.PHONY: test
test:
python3 -m unittest test
.PHONY: check-all-committed
check-all-committed:
if [ -n "$(GIT_PORCELAIN_STATUS)" ]; \
then \
echo 'YOU HAVE UNCOMMITTED CHANGES'; \
git status; \
exit 1; \
fi
.PHONY: pypi-upload
pypi-upload: check-all-committed test
rm -Rf dist/*
python3 -m build --help > /dev/null 2>&1 || python3 -m pip install build
python3 -m build
twine check dist/*
twine upload dist/*
.PHONY: ctags
ctags:
ctags -R .
.PHONY: clean
clean:
-rm -R build
-rm -v -- $(shell find . -name "*.pyc")
-rm -R xsd
.PHONY: analyze-xsd
analyze-xsd:
mkdir -p xsd
test -f xsd/gpx1.1.xsd || wget -c http://www.topografix.com/gpx/1/1/gpx.xsd -O xsd/gpx1.1.xsd
test -f xsd/gpx1.0.xsd || wget -c http://www.topografix.com/gpx/1/0/gpx.xsd -O xsd/gpx1.0.xsd
cd xsd && python pretty_print_schemas.py
.PHONY: mypy
mypy:
mypy --strict . gpxinfo