-
Notifications
You must be signed in to change notification settings - Fork 5
/
makefile
50 lines (36 loc) · 1.04 KB
/
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
.PHONY: install-pip-tools reqs install-env env test tag build publish docs
VERSION := $(shell python -c 'import colorhash;print(colorhash.__version__)')
# dev option to create update whole venv
env: install-pip-tools reqs install-env
build:
hatch build
# get current version and set a tag
tag:
git tag -f v$(VERSION)
# push both commits and tags
push:
git push
git push -f --tags
# https://test.pypi.org/project/colorhash/
publish-test: check
twine upload --config-file .pypirc --repository testpypi dist/*$(VERSION)*
# https://pypi.org/project/colorhash/
publish: check
twine upload --config-file .pypirc --repository pypi dist/**$(VERSION)*
# generates README markdown tables and color tiles
docs:
python -m docs.gen
# ===================
# --- SUB TARGETS ---
# ===================
install-pip-tools:
pip install -U pip pip-tools
reqs:
rm -f requirements-dev.txt
pip-compile --extra=dev --output-file=requirements-dev.txt pyproject.toml
install-env:
pip-sync requirements-dev.txt
test:
hatch run test:test
check:
twine check dist/*