-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (67 loc) · 2.62 KB
/
Makefile
File metadata and controls
79 lines (67 loc) · 2.62 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
68
69
70
71
72
73
74
75
76
77
78
79
# Extract - Makefile
# SwiftUI macOS/iOS app for photo library export
.PHONY: help format build clean test run setup format-fix open commit
# Default target
help:
@echo "Extract - Available commands:"
@echo " make open - Open project in Xcode"
@echo " make format - Run SwiftFormat on source code"
@echo " make build - Build the project (runs format first)"
@echo " make run - Build and run the app"
@echo " make test - Run unit tests"
@echo " make clean - Clean build artifacts"
@echo " make setup - Install development dependencies (SwiftFormat, GitHub CLI)"
@echo " make commit - Create intelligent commit using current changes"
# Install development dependencies
setup:
@echo "Setting up development environment..."
@if ! which brew > /dev/null; then \
echo "Error: Homebrew not found. Please install Homebrew first."; \
exit 1; \
fi
@echo "Installing SwiftFormat..."
brew install swiftformat
@echo "Installing GitHub CLI..."
brew install gh
@echo "✅ Development environment setup complete!"
@echo "💡 You can now use 'gh auth login' to authenticate with GitHub"
# Run SwiftFormat
format:
@echo "Running SwiftFormat..."
swiftformat .
# Build the project (with formatting and tests)
build: format test
@echo "Building Extract..."
xcodebuild -project extract.xcodeproj -scheme extract -configuration Debug build
# Build for release
release: format
@echo "Building Extract for Release..."
xcodebuild -project extract.xcodeproj -scheme extract -configuration Release build
# Build and run the app
run: build
@echo "Launching Extract..."
open /Users/jamielesouef/Library/Developer/Xcode/DerivedData/extract-*/Build/Products/Debug/extract.app
# Run tests
test: format
@echo "Building main app with testing enabled..."
xcodebuild -project extract.xcodeproj -target extract -configuration Debug build
@echo "Building test target..."
xcodebuild -project extract.xcodeproj -target extractTests -configuration Debug -destination 'platform=macOS' build
@echo "Test target built successfully. Note: Use Xcode to run tests interactively."
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
xcodebuild -project extract.xcodeproj -scheme extract clean
rm -rf ~/Library/Developer/Xcode/DerivedData/extract-*
# Fix formatting issues automatically where possible
format-fix:
@echo "Auto-fixing formatting issues..."
swiftformat .
# Open project in Xcode
open:
@echo "Opening Extract project in Xcode..."
open extract.xcodeproj
# Create intelligent commit using current changes
commit:
@echo "🚀 Starting smart commit process..."
@./scripts/smart-commit.sh --yes