-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (41 loc) · 1.09 KB
/
Makefile
File metadata and controls
52 lines (41 loc) · 1.09 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
.PHONY: setup run build clean lint lint-fix package smoke test check
.DEFAULT_GOAL := check
setup:
uv venv
uv sync --extra dev
run:
uv run fithit
lint:
uv run ruff check src/
uv run ruff format --check src/
lint-fix:
uv run ruff check --fix src/
uv run ruff format src/
test:
uv run pytest
check: lint test
build:
uv run pyinstaller \
--onefile \
--name fithit \
--target-arch arm64 \
--collect-all rich \
src/fithitcli/__main__.py
package: build
@set -e; \
VERSION=$$(grep '^version' pyproject.toml | head -1 | cut -d'"' -f2); \
echo "Packaging fithit v$$VERSION..."; \
cd dist && \
tar -czf "fithit-cli-$$VERSION-macos.tar.gz" fithit && \
shasum -a 256 "fithit-cli-$$VERSION-macos.tar.gz"
smoke: build
@set -e; \
tmp_home="$$(mktemp -d)"; \
trap 'rm -rf "$$tmp_home"' EXIT; \
env -i PATH="/usr/bin:/bin:/usr/sbin:/sbin" HOME="$$tmp_home" \
PYTHONNOUSERSITE=1 PYTHONPATH= PYTHONHOME= \
VIRTUAL_ENV= CONDA_PREFIX= CONDA_DEFAULT_ENV= PIPENV_ACTIVE= \
PYENV_VERSION= UV_PROJECT_ENV= \
./dist/fithit --help
clean:
rm -rf dist build __pycache__ src/fithitcli/__pycache__