chore(backend): update template to v0.6.0, conflicts left

This commit is contained in:
renovate Bot committed 2026-10-10 00:31:18 +00:00
1 parent aa5361c88b
commit e730b88d6d
12 files changed
+109 -21

No files matched your search

+5 -15
View File
@@ -1,12 +1,15 @@
COMPOSE := cd .. && docker compose
<<<<<<< before updating
IMAGE := beavergram/backend
IMAGE_INPUTS := pyproject.toml uv.lock Dockerfile
CODE := src scripts ../frontend
SERVICES := api userbot watcher
changed = ! git diff --quiet $(1) -- $(2) 2>/dev/null
stamp = { git update-ref $(1) HEAD 2>/dev/null || true; }
=======
>>>>>>> after updating
.PHONY: fmt check build pre-deploy post-deploy migrate revision session
.PHONY: fmt check build migrate revision session
fmt:
uv run ruff format
@@ -16,24 +19,11 @@ check:
uv run ruff format --check
uv run ruff check
uv run ty check
uv run python scripts/check_imports.py
build:
$(COMPOSE) build api
pre-deploy:
@if $(call changed,refs/deploy/backend,$(IMAGE_INPUTS)) || ! docker image inspect $(IMAGE) >/dev/null 2>&1; then \
$(MAKE) build && $(call stamp,refs/deploy/backend) && $(call stamp,refs/deploy/backend-code); \
fi
@$(COMPOSE) config --services | grep -qx postgres && $(COMPOSE) up -d postgres || true
$(MAKE) migrate
post-deploy:
@if $(call changed,refs/deploy/backend-code,$(CODE)); then \
running=$$($(COMPOSE) ps --services --status running | grep -x $(addprefix -e ,$(SERVICES))); \
[ -z "$$running" ] || $(COMPOSE) restart $$running; \
$(call stamp,refs/deploy/backend-code); \
fi
migrate:
$(COMPOSE) run --rm migrator $(or $(filter-out $@,$(MAKECMDGOALS)),upgrade head)