-
Notifications
You must be signed in to change notification settings - Fork 52
/
Makefile
47 lines (35 loc) · 1015 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
SHELL := bash
.PHONY: lint test test-all dist bump test-release release clean-dist clean
VENV_EXE=python3 -m virtualenv
VENV=.venv
VENV_ACTIVATE=. $(VENV)/bin/activate
BUMPTYPE=patch
$(VENV):
$(VENV_EXE) $(VENV)
$(VENV_ACTIVATE); pip install -e .
$(VENV_ACTIVATE); pip install build tox ruff bump2version twine wheel 'readme_renderer[md]'
lint: $(VENV)
$(VENV_ACTIVATE); ruff .
test: $(VENV)
$(VENV_ACTIVATE); python tests/test.py
test-all: $(VENV)
$(VENV_ACTIVATE); tox
dist: clean-dist $(VENV)
$(VENV_ACTIVATE); python -m build
ls -ls dist
tar tzf dist/*.tar.gz
$(VENV_ACTIVATE); twine check dist/*
bump: $(VENV)
$(VENV_ACTIVATE); bump2version $(BUMPTYPE)
git show -q
@echo
@echo "SUCCESS: Version was bumped and committed"
test-release: clean test dist
$(VENV_ACTIVATE); twine upload --repository-url https://test.pypi.org/legacy/ dist/*
release: clean test dist
$(VENV_ACTIVATE); twine upload dist/*
clean-dist:
rm -rf dist
rm -rf *.egg-info
clean: clean-dist
rm -rf $(VENV) .tox