26 lines
472 B
Makefile
26 lines
472 B
Makefile
APP_NAME=crm-core
|
|
DB_URL?=postgres://crm:crm@localhost:5432/crm_core?sslmode=disable
|
|
MIGRATE?=migrate
|
|
|
|
.PHONY: fmt lint test sqlc run migrate-up migrate-down
|
|
|
|
fmt:
|
|
go fmt ./...
|
|
|
|
lint:
|
|
golangci-lint run ./...
|
|
|
|
test:
|
|
go test ./...
|
|
|
|
sqlc:
|
|
sqlc generate -f internal/db/sqlc/sqlc.yaml
|
|
|
|
migrate-up:
|
|
$(MIGRATE) -path internal/db/migrations -database "$(DB_URL)" up
|
|
|
|
migrate-down:
|
|
$(MIGRATE) -path internal/db/migrations -database "$(DB_URL)" down 1
|
|
|
|
run:
|
|
go run ./cmd/api
|