backend-service/Makefile

57 lines
817 B
Makefile
Raw Normal View History

.PHONY: build run test clean deps server cli
# Build the server binary
build:
go build -o bin/server cmd/server/main.go
# Build the CLI binary
build-cli:
go build -o bin/cli cmd/cli/main.go
# Run the server
run:
go run cmd/server/main.go
# Run the CLI
cli:
go run cmd/cli/main.go
# Install dependencies
deps:
go mod tidy
go mod download
# Run tests
test:
go test ./...
# Clean build artifacts
clean:
rm -rf bin/
# Format code
fmt:
go fmt ./...
# Vet code
vet:
go vet ./...
# Run linter (requires golangci-lint)
lint:
golangci-lint run
# Database operations
db-migrate: build-cli
./bin/cli migrate
db-health: build-cli
./bin/cli db health
db-seed: build-cli
./bin/cli db seed
# Development setup
dev-setup: deps
cp .env.example .env
@echo "Please update .env file with your configuration"