Files
spsays-bff/Makefile
2026-05-09 23:19:19 +05:30

36 lines
564 B
Makefile

.PHONY: build run dev test clean lint
# Binary name
BINARY=spsays-bff
BUILD_DIR=./bin
# Build
build:
@echo "Building..."
@go build -o $(BUILD_DIR)/$(BINARY) ./cmd/api
# Run (build + execute)
run: build
@$(BUILD_DIR)/$(BINARY)
# Dev (with live reload — requires air: go install github.com/air-verse/air@latest)
dev:
@air -c .air.toml || go run ./cmd/api
# Test
test:
@go test -v -race -cover ./...
# Clean
clean:
@rm -rf $(BUILD_DIR)
@go clean
# Lint (requires golangci-lint)
lint:
@golangci-lint run ./...
# Tidy dependencies
tidy:
@go mod tidy