Files

37 lines
930 B
Makefile
Raw Permalink Normal View History

2026-03-24 23:16:22 -07:00
.PHONY: all build test proto proto-deps help
2026-03-24 21:11:45 -07:00
# Default target
2026-03-24 23:16:22 -07:00
all: build
# Build Go project
build:
@echo "Building Go project..."
go build -o bin/webstory ./cmd/webstory || exit 1
@echo "Build complete!"
# Run tests
test:
@echo "Running tests..."
go test -v ./...
2026-03-24 21:11:45 -07:00
# Generate Go code from proto files using buf
proto: proto-deps
@echo "Generating Go code from proto files..."
buf generate || exit 1
@echo "Proto generation complete!"
# Ensure buf is available
proto-deps:
@which buf >/dev/null 2>&1 || (echo "Error: buf is not installed. Please install Buf first." && exit 1)
# Help target
help:
@echo "Webstory Makefile"
@echo ""
@echo "Available targets:"
2026-03-24 23:16:22 -07:00
@echo " make all - Show this help message (default)"
@echo " make build - Build Go project"
@echo " make test - Run tests"
2026-03-24 21:11:45 -07:00
@echo " make proto - Generate Go code from proto files"
@echo " make proto-deps - Ensure buf is installed"