-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (43 loc) · 1.14 KB
/
Makefile
File metadata and controls
58 lines (43 loc) · 1.14 KB
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
55
56
57
58
SHELL := /bin/bash
.PHONY: install dev clean lint format test build mkdocs-build mkdocs-serve docs publish publish-test gh-deploy-docs
install:
uv tool install . --force
dev:
uv sync --dev
clean:
rm -rf dist/ build/ *.egg-info .pytest_cache .mypy_cache .ruff_cache
find . -type d -name __pycache__ -exec rm -rf {} +
lint:
uv run ruff check src/tab_cli tests
format:
uv run ruff format src/tab_cli tests
typecheck:
uv run ty check src/tab_cli
test:
uv run pytest
build: clean
uv build
mkdocs-build:
sh ./docs/gen_assets.sh
mkdocs build --strict
mkdocs-serve:
mkdocs serve --dev-addr=127.0.0.1:8000
docs: mkdocs-build
publish: build
uv publish
publish-test: build
uv publish --publish-url https://test.pypi.org/legacy/
gh-deploy-docs: docs
set -ex ; \
WORK="$$( mktemp -d )" ; \
VER="$$( git describe --always --tags --dirty )" ; \
git worktree add --force "$$WORK" gh-pages ; \
rm -rf "$$WORK"/* ; \
rsync -av site/ "$$WORK"/ ; \
if [ -f CNAME ] ; then cp CNAME "$$WORK"/ ; fi ; \
pushd "$$WORK" ; \
git add -A ; \
git commit -m "Updated gh-pages $$VER" ; \
popd ; \
git worktree remove "$$WORK" ; \
git push origin gh-pages