38 lines
561 B
Makefile
38 lines
561 B
Makefile
.PHONY: build run test clean
|
|
|
|
# Build the application
|
|
build:
|
|
go build -o spore-registry main.go
|
|
|
|
# Run the application
|
|
run:
|
|
go run main.go
|
|
|
|
# Run tests
|
|
test:
|
|
go test -v ./...
|
|
|
|
# Clean build artifacts
|
|
clean:
|
|
rm -f spore-registry
|
|
rm -rf registry/
|
|
rm -f registry.db
|
|
|
|
# Run tests with coverage
|
|
test-coverage:
|
|
go test -coverprofile=coverage.out ./...
|
|
go tool cover -html=coverage.out -o coverage.html
|
|
|
|
# Format code
|
|
fmt:
|
|
go fmt ./...
|
|
|
|
# Lint code (requires golangci-lint)
|
|
lint:
|
|
golangci-lint run
|
|
|
|
# Install dependencies
|
|
deps:
|
|
go mod download
|
|
go mod tidy
|