fooder-api/Makefile
Piotr Domański 5bc37bc127
Some checks are pending
Python lint and test / linttest (push) Waiting to run
[cron] add dockerfile
2024-08-03 23:24:52 +02:00

47 lines
925 B
Makefile

VERSION=0.`git rev-list --count HEAD`
.PHONY: black
DOCKER_BUILD=docker build
ifeq ($(shell uname -m), arm64)
DOCKER_BUILD=docker buildx build --platform linux/amd64
endif
api: fooder Dockerfile requirements.txt
$(DOCKER_BUILD) -t registry.domandoman.xyz/fooder/api -f Dockerfile .
cron: Dockerfile.cron
$(DOCKER_BUILD) -t registry.domandoman.xyz/fooder/cron -f Dockerfile.cron .
build: api cron
push:
docker push registry.domandoman.xyz/fooder/api
docker push registry.domandoman.xyz/fooder/cron
black:
python -m black fooder
.PHONY: mypy
mypy:
python -m mypy fooder
.PHONY: flake
flake:
python -m flake8 fooder
.PHONY: lint
lint: black mypy flake
.PHONY: version
version:
@echo $(VERSION)
.PHONY: create-venv
create-venv:
python3 -m venv .venv --prompt="fooderapi-venv" --system-site-packages
bash -c "source .venv/bin/activate && pip install -r requirements_local.txt"
.PHONY: test
test:
./test.sh