-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (30 loc) · 930 Bytes
/
Makefile
File metadata and controls
42 lines (30 loc) · 930 Bytes
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
.PHONY: build test test-unit e2e lint install clean tools hooks
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
LDFLAGS := -ldflags "-X github.com/boneskull/gh-stack/cmd.version=$(VERSION)"
build:
go build $(LDFLAGS) -o gh-stack .
test: ## Run all tests (unit + E2E)
go test ./... -v
test-unit: ## Run unit tests only (faster)
go test ./cmd/... ./internal/... -v
e2e: ## Run E2E tests only
go test ./e2e/... -v
lint:
golangci-lint run ./...
# Run all checks (what CI does)
ci: lint test build
install:
go install $(LDFLAGS) .
clean:
rm -f gh-stack
# Install as gh extension
gh-install: build
gh extension remove gh-stack || true
gh extension install .
# Install development tools
tools:
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.8.0
go install github.com/evilmartians/lefthook/v2@latest
# Install git hooks via lefthook
hooks:
lefthook install