forked from solokeys/solo1-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (39 loc) · 916 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
54
.PHONY: black build clean publish reinstall
# setup development environment
init: update-venv
# ensure this passes before commiting
check: lint
black --check solo/
isort --profile black --check-only solo/
# automatic code fixes
fix: black isort
black:
black solo/
isort:
isort --profile black solo/
lint:
flake8 solo/
semi-clean:
rm -rf **/__pycache__
clean: semi-clean
rm -rf venv
rm -rf dist
# Package management
VERSION_FILE := "solo/VERSION"
VERSION := $(shell cat $(VERSION_FILE))
tag:
git tag -a $(VERSION) -m"v$(VERSION)"
git push origin $(VERSION)
build: check
flit build
publish: check
flit --repository pypi publish
venv:
python3 -m venv venv
venv/bin/pip install -U pip
# re-run if dev or runtime dependencies change,
# or when adding new scripts
update-venv: venv
venv/bin/pip install -U pip
venv/bin/pip install -U -r dev-requirements.txt
venv/bin/flit install --symlink