-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (44 loc) · 933 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
51
52
53
.PHONY: clean
VERSION = 1.1.0
DIST_PATH = ./dist
PYTHON_BIN = python3.13
VENV_PATH = ./venv
VENV = . $(VENV_PATH)/bin/activate;
SRC := \
$(wildcard dohome_api/*/*.py) \
$(wildcard dohome_api/*.py)
.PHONY: publish
publish: clean build
$(VENV) python3 -m twine upload --repository pypi dist/*
git add Makefile
git commit -m "chore: release v$(VERSION)"
git tag "v$(VERSION)"
git push
git push --tags
.PHONY: clean
clean:
rm -rf *.egg-info
rm -rf build
rm -rf dist
.PHONY: build
build:
echo "$(VERSION)" > .version
$(VENV) python -m build
.PHONY: install
install:
$(VENV) pip install .
$(VENV) pipx install .
.PHONY: lint
lint:
$(VENV) ruff check dohome tests
$(VENV) pylint dohome tests
.PHONY: test
test:
$(VENV) pytest -o log_cli=true -vv tests/**/*.py
.PHONY: configure
configure:
rm -rf $(VENV_PATH)
$(PYTHON_BIN) -m venv $(VENV_PATH)
$(VENV) pip install -r requirements.txt
make build
make install