-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (38 loc) · 953 Bytes
/
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
setup:
@pip install -U pip poetry
dependencies:
@make setup
@poetry install --no-root --extras "auth"
update:
@poetry update
test:
@make check
@make lint
@make unit
check:
@echo "Checking safety and integrity ..."
poetry check
poetry run safety check
lint:
@echo "Checking code style ..."
poetry run ruff check .
poetry run ruff format --check .
style:
@echo "Applying code style ..."
poetry run ruff check . --fix
poetry run ruff format .
unit:
@echo "Running unit tests ..."
clean:
@rm -rf .coverage coverage.xml dist/ build/ *.egg-info/
publish:
@make clean
@printf "\nPublishing lib"
@make setup
@poetry config pypi-token.pypi $(PYPI_API_TOKEN)
@poetry publish --build
@make clean
dev-install:
@pip uninstall -y sanic_rest
@\rm -rv dist/; poetry build --format sdist && tar -xvf dist/*.tar.gz -O '*/setup.py' > setup.py && python setup.py develop
.PHONY: setup dependencies update test check lint clean publish