File: Makefile

package info (click to toggle)
python-pykube-ng 22.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 424 kB
  • sloc: python: 2,336; makefile: 44
file content (38 lines) | stat: -rw-r--r-- 800 bytes parent folder | download
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
.PHONY: test docs package upload

VERSION          ?= $(shell git describe --tags --always --dirty)

default: package

clean:
	rm -fr build dist *egg-info .tox/ .cache/ .pytest_cache/ docs/_build/

.PHONY: install
install:
	poetry install

.PHONY: lint
lint: install
	poetry run pre-commit run --all-files

test: lint install
	poetry run coverage run --source=pykube -m py.test
	poetry run coverage html
	poetry run coverage report

apidocs:
	# update autodoc, only needs to be run when new modules are added
	poetry run sphinx-apidoc pykube -o docs/api/ -T --force

docs:
	poetry run sphinx-build -M html docs docs/_build

package: test
	poetry build

upload: package
	poetry publish

version:
	sed -i 's/__version__ = .*/__version__ = "${VERSION}"/' pykube/__init__.py
	poetry version "${VERSION}"