chore(makefile): separate build, install, and service restart targets

Remove implicit pnpm build from daemon-start and daemon-restart so
restarting the service doesn't trigger a rebuild. Add a deploy target
that explicitly chains build + daemon-restart for the combined workflow.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
William Valentin
2026-02-27 10:45:02 -08:00
parent 90ef075295
commit 658f024eb8
+8 -8
View File
@@ -1,7 +1,7 @@
# Flynn Makefile
# Self-hosted personal AI agent
.PHONY: build dev start stop restart status logs tui tui-fs tui-dev test test-run lint typecheck check help deps install daemon-start daemon-stop daemon-restart daemon-status daemon-logs enable disable llama-start llama-stop llama-restart llama-status llama-logs llama-enable llama-disable llamacpp-start llamacpp-stop llamacpp-restart llamacpp-status llamacpp-logs llamacpp-enable llamacpp-disable ollama-start ollama-stop ollama-restart ollama-status ollama-logs ollama-enable ollama-disable compose-up compose-down compose-restart compose-logs compose-ps compose-pull whisper-start whisper-stop whisper-restart whisper-logs brave-start brave-stop brave-restart brave-logs searxng-start searxng-stop searxng-restart searxng-logs skills-list skills-info skills-install skills-uninstall skills-refresh
.PHONY: build dev start stop restart status logs tui tui-fs tui-dev test test-run lint typecheck check help deps install deploy daemon-start daemon-stop daemon-restart daemon-status daemon-logs enable disable llama-start llama-stop llama-restart llama-status llama-logs llama-enable llama-disable llamacpp-start llamacpp-stop llamacpp-restart llamacpp-status llamacpp-logs llamacpp-enable llamacpp-disable ollama-start ollama-stop ollama-restart ollama-status ollama-logs ollama-enable ollama-disable compose-up compose-down compose-restart compose-logs compose-ps compose-pull whisper-start whisper-stop whisper-restart whisper-logs brave-start brave-stop brave-restart brave-logs searxng-start searxng-stop searxng-restart searxng-logs skills-list skills-info skills-install skills-uninstall skills-refresh
# Default target
.DEFAULT_GOAL := help
@@ -17,19 +17,19 @@ start: ## Start production build (foreground)
node dist/cli/index.js start
# Systemd daemon management
daemon-start: ## Build and start the systemd service
pnpm build
daemon-start: ## Start the systemd service
systemctl --user start flynn.service
@echo "Flynn daemon built and started"
@echo "Flynn daemon started"
daemon-stop: ## Stop the systemd service
systemctl --user stop flynn.service
@echo "Flynn daemon stopped"
daemon-restart: ## Build and restart the systemd service
pnpm build
daemon-restart: ## Restart the systemd service (no build)
systemctl --user restart flynn.service
@echo "Flynn daemon built and restarted"
@echo "Flynn daemon restarted"
deploy: build daemon-restart ## Build and restart the systemd service
daemon-status: ## Check systemd service status
systemctl --user status flynn.service
@@ -116,7 +116,7 @@ ollama-disable: ## Disable Ollama from starting on boot
# Aliases for convenience
stop: daemon-stop ## Alias for daemon-stop
restart: daemon-restart ## Alias for daemon-restart
restart: daemon-restart ## Restart systemd service (no build; use deploy to build+restart)
status: daemon-status ## Alias for daemon-status
logs: daemon-logs ## Alias for daemon-logs