-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (46 loc) · 1.35 KB
/
Copy pathMakefile
File metadata and controls
55 lines (46 loc) · 1.35 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
.PHONY: build test lint clean run dry-run
# Default target
all: lint test build
# Build target
build:
@echo "Building gh-issue-bulk-create..."
@go build -o gh-issue-bulk-create
# Run tests
test:
@echo "Running tests..."
@go test -v ./...
# Ensure staticcheck is installed
ensure-staticcheck:
@which staticcheck > /dev/null || (echo "Installing staticcheck..." && go install honnef.co/go/tools/cmd/staticcheck@latest)
# Run linters
lint: ensure-staticcheck
@echo "Running staticcheck..."
@staticcheck ./...
@echo "Running go vet..."
@go vet ./...
@echo "Running go fmt..."
@go fmt ./...
# Cleanup
clean:
@echo "Cleaning up..."
@rm -f gh-issue-bulk-create
# Example run (dry-run mode)
dry-run:
@echo "Running with dry-run mode..."
@go run . --template sample-template.md --csv sample-data.csv --dry-run
# Install as GitHub CLI extension
install:
@echo "Installing as GitHub CLI extension..."
@go build -o gh-issue-bulk-create
@gh extension install .
# Help
help:
@echo "Available targets:"
@echo " all - Run lint, test and build (default)"
@echo " build - Build the binary"
@echo " test - Run tests"
@echo " lint - Run linters"
@echo " clean - Remove built binary"
@echo " dry-run - Run with dry-run mode"
@echo " install - Install as GitHub CLI extension"
@echo " help - Show this help message"