Packaging and docker publishing
This commit is contained in:
parent
e4fb12d173
commit
5797dc0dee
7 changed files with 127 additions and 32 deletions
39
Makefile
Normal file
39
Makefile
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
ifeq (run,$(firstword $(MAKECMDGOALS)))
|
||||
# use the rest as arguments for "run"
|
||||
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||
# ...and turn them into do-nothing targets
|
||||
$(eval $(RUN_ARGS):;@:)
|
||||
endif
|
||||
|
||||
.PHONY: all build run test
|
||||
|
||||
# code quality
|
||||
all: black typehint lint
|
||||
|
||||
black:
|
||||
uv run isort --multi-line 3 --profile black src/ tests/
|
||||
uv run black --target-version py311 src/ tests/
|
||||
|
||||
typehint:
|
||||
uv run mypy --ignore-missing-imports src/ tests/
|
||||
|
||||
lint:
|
||||
uv run pylint src/
|
||||
|
||||
# check
|
||||
check: all
|
||||
|
||||
# build
|
||||
build:
|
||||
# https://stackoverflow.com/questions/24347450/how-do-you-add-additional-files-to-a-wheel
|
||||
rm -rf build/* dist/* *.egg-info
|
||||
uv sync
|
||||
uv build --wheel --out-dir dist
|
||||
docker build -t source.madyanne.fr/yax/dumbremind .
|
||||
|
||||
publish:
|
||||
docker push source.madyanne.fr/yax/dumbremind
|
||||
|
||||
# run
|
||||
run:
|
||||
uv run -m dumbremind
|
||||
Loading…
Add table
Add a link
Reference in a new issue