kat/Makefile
2025-05-10 18:18:58 -04:00

33 lines
902 B
Makefile

# File: Makefile
.PHONY: all generate clean test
# Variables
GOLANGCI_LINT_VERSION := v1.55.2 # Or your preferred version
all: generate test
generate:
@echo "Generating Go code from Protobuf definitions..."
@./scripts/gen-proto.sh
# Placeholder for future commands
clean:
@echo "Cleaning up generated files and build artifacts..."
@rm -f ./api/v1alpha1/*.pb.go
@rm -f kat-agent katcall
test:
@echo "Running tests..."
@go test ./...
lint:
@echo "Running linter..."
@if ! command -v golangci-lint &> /dev/null; then \
echo "golangci-lint not found. Installing..."; \
go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION); \
fi
@golangci-lint run
# Add to go.mod if not already present by go install
# go get google.golang.org/protobuf/cmd/protoc-gen-go
# go get google.golang.org/grpc/cmd/protoc-gen-go-grpc (if you plan to use gRPC services soon)