Files
go-hugo-cms/Makefile
2025-09-22 12:13:37 +02:00

41 lines
820 B
Makefile

.PHONY: build clean test install dev help
# Build the application
build:
go build -o bin/go-hugo-cms cmd/go-hugo-cms/main.go
# Clean build artifacts
clean:
rm -rf bin/
# Run tests
test:
go test -v ./...
# Install dependencies
deps:
go mod download
go mod tidy
# Build and install to GOPATH/bin
install: build
cp bin/go-hugo-cms $(GOPATH)/bin/
# Run in development mode
dev: build
./bin/go-hugo-cms
# Show help
help:
@echo "Available commands:"
@echo " build - Build the go-hugo-cms binary"
@echo " clean - Remove build artifacts"
@echo " test - Run tests"
@echo " deps - Download and tidy dependencies"
@echo " install - Build and install to GOPATH/bin"
@echo " dev - Build and run for development"
@echo " help - Show this help message"
# Default target
all: build