-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 1 KB
/
Makefile
File metadata and controls
43 lines (32 loc) · 1 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
.PHONY: test coverage coverage-html clean install uninstall build upload all
UV := uv
TWINE_UPLOAD := $(UV) run twine upload --repository pypi --username __token__ --password $(TWINE_API_TOKEN)
PYTEST := $(UV) run pytest
all: clean build
test:
$(PYTEST) --cov=src/easierdocker --cov-branch --cov-report=term-missing tests
coverage: test
coverage-html:
$(PYTEST) --cov=src/easierdocker --cov-branch --cov-report=html tests
clean:
find . -name '__pycache__' -type d -exec rm -rf {} +
find . -name 'easier_docker.egg-info' -type d -exec rm -rf {} +
find . -name 'example.egg-info' -type d -exec rm -rf {} +
rm -rf htmlcov
rm -rf build
rm -rf dist
rm -rf .coverage
rm -rf htmlcov
install:
$(UV) sync --extra dev
uninstall:
$(UV) pip uninstall -y easier-docker
build:
$(UV) run python -m build
upload:
@echo "Uploading the package..."
@if [ -z "$(TWINE_API_TOKEN)" ]; then \
echo "Error: TWINE_API_TOKEN is not set. Please export it as an environment variable."; \
exit 1; \
fi
$(TWINE_UPLOAD) dist/*