fix: make check/config cross-platform for Windows (#1080) (#1093)

* fix: make check/config cross-platform for Windows (#1080)

- replace shell-based check/config recipes with Python entrypoints
- add a cross-platform dependency checker script
- add a cross-platform config bootstrap script
- route make targets through a Python variable for consistent invocation
- preserve existing config-abort behavior when config file already exists

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Willem Jiang
2026-03-13 21:33:12 +08:00
committed by GitHub
parent b155923ab0
commit a79d414695
3 changed files with 194 additions and 8 deletions

View File

@@ -2,6 +2,8 @@
.PHONY: help config check install dev dev-daemon start stop up down clean docker-init docker-start docker-stop docker-logs docker-logs-frontend docker-logs-gateway
PYTHON ?= python
help:
@echo "DeerFlow Development Commands:"
@echo " make config - Generate local config files (aborts if config already exists)"
@@ -27,17 +29,11 @@ help:
@echo " make docker-logs-gateway - View Docker gateway logs"
config:
@if [ -f config.yaml ] || [ -f config.yml ] || [ -f configure.yml ]; then \
echo "Error: configuration file already exists (config.yaml/config.yml/configure.yml). Aborting."; \
exit 1; \
fi
@cp config.example.yaml config.yaml
@test -f .env || cp .env.example .env
@test -f frontend/.env || cp frontend/.env.example frontend/.env
@$(PYTHON) ./scripts/configure.py
# Check required tools
check:
@./scripts/check.sh
@$(PYTHON) ./scripts/check.py
# Install all dependencies
install: