added Makefile; changed .gitignore; go files
This commit is contained in:
40
Makefile
Normal file
40
Makefile
Normal file
@@ -0,0 +1,40 @@
|
||||
.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
|
||||
Reference in New Issue
Block a user