-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (52 loc) · 1.91 KB
/
Makefile
File metadata and controls
65 lines (52 loc) · 1.91 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
59
60
61
62
63
64
65
.PHONY: install lint format mypy test test-integration test-integration-local check build release-patch release-minor release-major
install:
uv sync
lint:
uv run ruff check src/ tests/
format:
uv run ruff format src/ tests/
uv run ruff check --fix --select I src/ tests/
mypy:
uv run mypy src/
test:
uv run pytest
test-integration:
uv run pytest -m integration
# Run integration tests against the DataMasque instance in your active
# `~/.config/datamasque-cli/config.toml` profile. Saves typing DM_TEST_* env
# vars when smoke-testing a branch against your own dev instance.
test-integration-local:
@eval "$$(python3 scripts/active_profile_env.py)" && uv run pytest -m integration
check: lint format-check mypy test
format-check:
uv run ruff format --check src/ tests/
build:
uv build
# Bump version, commit, tag, push — CI publishes automatically.
# Usage: make release-patch (0.1.0 → 0.1.1)
# make release-minor (0.1.0 → 0.2.0)
# make release-major (0.1.0 → 1.0.0)
release-patch: check
$(eval VERSION := $(shell python3 scripts/bump_version.py patch))
uv lock
git add pyproject.toml uv.lock
git commit -m "Release v$(VERSION)"
git tag "v$(VERSION)"
git push && git push --tags
@echo "Released v$(VERSION) — CI will publish to PyPI (https://pypi.org/p/datamasque-cli)"
release-minor: check
$(eval VERSION := $(shell python3 scripts/bump_version.py minor))
uv lock
git add pyproject.toml uv.lock
git commit -m "Release v$(VERSION)"
git tag "v$(VERSION)"
git push && git push --tags
@echo "Released v$(VERSION) — CI will publish to PyPI (https://pypi.org/p/datamasque-cli)"
release-major: check
$(eval VERSION := $(shell python3 scripts/bump_version.py major))
uv lock
git add pyproject.toml uv.lock
git commit -m "Release v$(VERSION)"
git tag "v$(VERSION)"
git push && git push --tags
@echo "Released v$(VERSION) — CI will publish to PyPI (https://pypi.org/p/datamasque-cli)"