-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (54 loc) · 1.97 KB
/
Makefile
File metadata and controls
67 lines (54 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.PHONY: help proto build test lint fmt clean install release
help: ## Show this help message
@echo 'Usage: make [target]'
@echo ''
@echo 'Available targets:'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
proto: ## Generate Go code from protobuf definitions
@echo "Generating protobuf files..."
@protoc --go_out=. --go_opt=module=github.com/conallob/jira-beads-sync --proto_path=proto proto/jira.proto proto/beads.proto
@echo "Protobuf generation complete"
build: proto ## Build the binary
@echo "Building jira-beads-sync..."
@go build -o jira-beads-sync ./cmd/jira-beads-sync
@echo "Build complete: ./jira-beads-sync"
test: proto ## Run tests
@echo "Running tests..."
@go test -v -race -coverprofile=coverage.out ./...
@echo "Tests complete"
coverage: test ## Show test coverage
@go tool cover -html=coverage.out
lint: proto ## Run linter
@echo "Running linter..."
@golangci-lint run
@echo "Linting complete"
fmt: ## Format code
@echo "Formatting code..."
@go fmt ./...
@echo "Formatting complete"
clean: ## Clean build artifacts
@echo "Cleaning..."
@rm -f jira-beads-sync
@rm -f coverage.out
@rm -rf dist/
@rm -rf .beads/
@echo "Clean complete"
install: build ## Install binary to $GOPATH/bin
@echo "Installing to $(GOPATH)/bin..."
@cp jira-beads-sync $(GOPATH)/bin/
@echo "Installation complete"
release-dry-run: proto ## Test release process without publishing
@echo "Running GoReleaser in dry-run mode..."
@goreleaser release --snapshot --clean
@echo "Dry-run complete. Check dist/ directory"
release-snapshot: proto ## Create a snapshot release (no tag required)
@echo "Creating snapshot release..."
@goreleaser release --snapshot --clean
@echo "Snapshot release complete"
deps: ## Download and tidy dependencies
@echo "Downloading dependencies..."
@go mod download
@go mod tidy
@echo "Dependencies updated"
verify: proto fmt lint test ## Run all verification steps
@echo "All verification steps passed!"