forked from joa23/linear-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (42 loc) · 1.35 KB
/
Copy pathMakefile
File metadata and controls
51 lines (42 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
# Version from git tag or commit
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
LDFLAGS := -ldflags "-X github.com/joa23/linear-cli/internal/cli.Version=$(VERSION)"
# Build CLI
build:
go build $(LDFLAGS) -o bin/linear ./cmd/linear
# Run unit tests (excludes integration tests)
test:
go test -v ./...
# Run integration tests (requires LINEAR_TOKEN)
integration-test:
go test -v -tags=integration ./...
# Check test coverage
coverage:
go test -cover ./...
# Install dependencies
install-deps:
@echo "Installing dependencies..."
@if ! command -v claude >/dev/null 2>&1; then \
npm install -g @anthropic-ai/claude-cli; \
else \
echo "✓ Claude CLI already installed"; \
fi
@echo "✓ Dependencies installed"
# Setup (install dependencies)
setup: install-deps
@echo "✓ Setup complete!"
# Clean build artifacts
clean:
rm -f bin/linear
# Show help
help:
@echo "Linear CLI"
@echo ""
@echo "Commands:"
@echo " make build - Build CLI binary"
@echo " make test - Run unit tests"
@echo " make integration-test - Run integration tests (needs LINEAR_TOKEN)"
@echo " make coverage - Check test coverage"
@echo " make setup - Install dependencies"
@echo " make clean - Clean build artifacts"
.PHONY: build test integration-test coverage install-deps setup clean help