-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (52 loc) · 1.93 KB
/
Makefile
File metadata and controls
64 lines (52 loc) · 1.93 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
# Makefile for ClaudeCodeUsage
# Provides convenient commands for development
.PHONY: help test test-core test-data test-ui clean format lint screenshot release release-local
# Default target
help:
@echo "ClaudeCodeUsage Development Commands"
@echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
@echo " make test - Run all tests"
@echo " make screenshot - Capture UI previews to /tmp/ClaudeUsageUI/"
@echo " make clean - Clean build artifacts"
@echo " make format - Format code with swift-format"
@echo " make lint - Lint code with SwiftLint"
@echo " make release - Build signed/notarized DMG"
@echo " make release-local - Build DMG (skip notarization)"
# Run all tests
test: test-core test-data test-ui
test-core:
swift test --package-path Packages/ClaudeUsageCore
test-data:
swift test --package-path Packages/ClaudeUsageData
test-ui:
swift test --package-path Packages/ClaudeUsageUI
# Clean build artifacts
clean:
rm -rf Packages/ClaudeUsageCore/.build
rm -rf Packages/ClaudeUsageData/.build
rm -rf Packages/ClaudeUsageUI/.build
rm -rf build
# Format code (requires swift-format)
format:
@if command -v swift-format &> /dev/null; then \
swift-format -i -r Packages/*/Sources Packages/*/Tests; \
else \
echo "swift-format not installed. Install with: brew install swift-format"; \
fi
# Lint code (requires SwiftLint)
lint:
@if command -v swiftlint &> /dev/null; then \
swiftlint; \
else \
echo "SwiftLint not installed. Install with: brew install swiftlint"; \
fi
# Capture UI preview screenshots
screenshot:
swift run --package-path Packages/ClaudeUsageUI PreviewCapture
@echo "Screenshots saved to /tmp/ClaudeUsageUI/"
# Build signed and notarized DMG for distribution
release:
@./scripts/create-dmg.sh
# Build DMG without notarization (for local testing)
release-local:
@./scripts/create-dmg.sh --skip-notarize