Files
ZFile/Makefile
2026-03-06 21:32:58 +03:00

45 lines
1008 B
Makefile

.PHONY: build-all frontend-build sync-web backend-build run-all up down run-local run-backend run-frontend auto-commit push clean
build-all: frontend-build sync-web backend-build
frontend-build:
cd frontend && bun install --frozen-lockfile
cd frontend && bun run build
sync-web:
rm -rf backend/web/dist
mkdir -p backend/web
cp -R frontend/dist backend/web/dist
backend-build:
mkdir -p dist
cd backend && go build -o ../dist/driveflow-allinone .
run-all:
docker compose up --build
up:
docker compose up -d --build
down:
docker compose down
run-local: build-all
bunx concurrently -n api,web "./dist/driveflow-allinone" "bun --cwd frontend dev"
run-backend:
cd backend && go run .
run-frontend:
bun --cwd frontend dev
auto-commit:
git add -A
git commit -m "$(if $(MSG),$(MSG),chore: auto commit $$(date '+%Y-%m-%d %H:%M:%S'))"
push:
git push $(if $(REMOTE),$(REMOTE),origin) $(if $(BRANCH),$(BRANCH),$$(git branch --show-current))
clean:
rm -rf dist backend/web/dist frontend/dist