chore: локальный запуск без Docker и SourceCraft; fix: относительный GIT_CLONE_DIR
- make demo-repo: локальный bare-репозиторий загрузок из infra/uploads-template - make run: бот на этой машине (SQLite, настройки из .env) - fix: при относительном clone_dir клон уезжал в data/data/uploads (git clone запускается из родительской папки) — путь теперь абсолютный; тест на это - data/ в .gitignore Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.PHONY: install lint fmt typecheck test cov up down logs ps
|
||||
.PHONY: install lint fmt typecheck test cov up down logs ps run demo-repo
|
||||
|
||||
install:
|
||||
uv sync
|
||||
@@ -30,3 +30,18 @@ logs:
|
||||
|
||||
ps:
|
||||
docker compose ps
|
||||
|
||||
# Run the bot on this machine without Docker: SQLite (./tgit.db) and the settings from .env
|
||||
run:
|
||||
uv run python -m app
|
||||
|
||||
# A local uploads repo seeded from the template — try the bot without SourceCraft:
|
||||
# make demo-repo → put the printed GIT_UPLOADS_URL into .env → make run
|
||||
DEMO_REPO := $(CURDIR)/data/demo-uploads.git
|
||||
demo-repo:
|
||||
@test ! -e $(DEMO_REPO) || { echo "$(DEMO_REPO) already exists"; exit 1; }
|
||||
@rm -rf data/demo-seed && mkdir -p data && cp -r infra/uploads-template data/demo-seed
|
||||
@cd data/demo-seed && git init -q -b main && git add -A \
|
||||
&& git -c user.name=tgit-bot -c user.email=tgit-bot@users.noreply.tgit commit -qm "init: uploads template"
|
||||
@git clone -q --bare data/demo-seed $(DEMO_REPO) && rm -rf data/demo-seed
|
||||
@echo "GIT_UPLOADS_URL=$(DEMO_REPO)"
|
||||
|
||||
Reference in New Issue
Block a user