composed6/services/api/Makefile
jordan e6993db729
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Add service component: api
2026-02-01 20:05:24 +00:00

35 lines
568 B
Makefile

.PHONY: build run test lint fmt docker-build clean
SERVICE := api
BINARY := bin/$(SERVICE)
GO_MODULE := github.com/jordan/composed6
# Build the service binary
build:
go build -o $(BINARY) ./cmd/server
# Run the service locally
run:
go run ./cmd/server
# Run tests
test:
go test -v ./...
# Run linter
lint:
golangci-lint run ./...
# Format code
fmt:
gofmt -w .
goimports -w -local $(GO_MODULE) .
# Build Docker image (run from monorepo root)
docker-build:
docker build -t $(SERVICE):latest -f Dockerfile ../..
# Clean build artifacts
clean:
rm -rf bin/