fix: export Go PATH globally in Makefile so all targets find go/goose/air
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
0679ff21ae
commit
02a9320c69
@@ -2,6 +2,10 @@
|
|||||||
-include .env
|
-include .env
|
||||||
export
|
export
|
||||||
|
|
||||||
|
# Ensure Go and user Go binaries are always on PATH (needed on servers where
|
||||||
|
# /etc/profile.d is only sourced for login shells, not by make).
|
||||||
|
export PATH := /usr/local/go/bin:$(HOME)/go/bin:$(PATH)
|
||||||
|
|
||||||
.PHONY: install build \
|
.PHONY: install build \
|
||||||
docker-up docker-down migrate-up migrate-down \
|
docker-up docker-down migrate-up migrate-down \
|
||||||
run-backend run-frontend \
|
run-backend run-frontend \
|
||||||
@@ -32,10 +36,10 @@ docker-down:
|
|||||||
docker compose down
|
docker compose down
|
||||||
|
|
||||||
migrate-up:
|
migrate-up:
|
||||||
PATH=$$HOME/go/bin:$$PATH goose -dir migrations postgres "$(DATABASE_URL)" up
|
goose -dir migrations postgres "$(DATABASE_URL)" up
|
||||||
|
|
||||||
migrate-down:
|
migrate-down:
|
||||||
PATH=$$HOME/go/bin:$$PATH goose -dir migrations postgres "$(DATABASE_URL)" down
|
goose -dir migrations postgres "$(DATABASE_URL)" down
|
||||||
|
|
||||||
## ── Production servers (require `make build` first) ─────────────────────────
|
## ── Production servers (require `make build` first) ─────────────────────────
|
||||||
|
|
||||||
@@ -50,7 +54,7 @@ run-frontend:
|
|||||||
## ── Development servers (hot reload) ────────────────────────────────────────
|
## ── Development servers (hot reload) ────────────────────────────────────────
|
||||||
|
|
||||||
dev-backend:
|
dev-backend:
|
||||||
cd backend && PATH=$$HOME/go/bin:$$PATH air
|
cd backend && air
|
||||||
|
|
||||||
dev-frontend:
|
dev-frontend:
|
||||||
cd frontend && env -u PORT npm run dev
|
cd frontend && env -u PORT npm run dev
|
||||||
|
|||||||
Reference in New Issue
Block a user