-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (49 loc) · 1.3 KB
/
Makefile
File metadata and controls
60 lines (49 loc) · 1.3 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
# SPDX-FileCopyrightText: 2025 Stefan Helmert <stefan@entroserv.de>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
.DEFAULT_GOAL := build
.PHONY: build lint test docs package deploy
PROJ_SLUG = stl2step
SHELL = bash
version=$(shell git describe --tags --abbrev=0)
build:
echo "__version__ = \"$(version)\"" > ./$(PROJ_SLUG)/_version.py
poetry version $(version)
poetry build
lint:
poetry run black --check .
poetry run isort --check .
poetry run reuse lint
test: clean
mkdir -p build
poetry run pytest tests/
docs:
poetry run sphinx-apidoc -f -o ./docs/source/ ./$(PROJ_SLUG)
cd docs && poetry run make html
package: clean docs
poetry build
prepair-publish:
sed -i "s/example_step.png/https:\/\/raw.githubusercontent.com\/TheTesla\/stl2step\/refs\/tags\/$(version)\/example_step.png/g" README.md
publish:
poetry publish
clean:
echo "__version__ = \"0.0.0+devel\"" > ./$(PROJ_SLUG)/_version.py
poetry version 0.0.0+devel
rm -rf .pytest_cache \
rm -rf dist \
rm -rf build \
rm -rf __pycache__ \
rm -rf $(PROJ_SLUG)/__pycache__ \
rm -rf tests/__pycache__
rm -rf stl2step.dist
rm -rf stl2step.build
rm -f tests/resources/*.step
#rm -rf docs/build \
rm -rf *.egg-info \
rm -rf docs/source/modules \
rm -rf htmlcov \
rm -rf meta\
rm -rf output
reformat:
poetry run isort .
poetry run black .