-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (62 loc) · 2.34 KB
/
Copy pathMakefile
File metadata and controls
72 lines (62 loc) · 2.34 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
# Makefile for Gini Mobile iOS
# Usage: make lint scheme=<scheme_name>
# Default configuration
WORKSPACE := GiniMobile.xcworkspace
DESTINATION := "platform=iOS Simulator,id=dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder"
CONFIGURATION := Debug
# Color output
RED := \033[0;31m
GREEN := \033[0;32m
YELLOW := \033[0;33m
BLUE := \033[0;34m
NC := \033[0m # No Color
# Scheme validation
ifeq ($(scheme),)
SCHEME_ERROR := true
else
SCHEME := $(scheme)
endif
.PHONY: help
help: ## Show this help message
@echo "$(BLUE)Gini Mobile iOS - Makefile$(NC)"
@echo ""
@echo "$(YELLOW)Usage:$(NC)"
@echo " make lint scheme=<scheme_name> - Validate compilation for a specific scheme"
@echo " make list-schemes - List all available schemes"
@echo " make clean - Clean build artifacts"
@echo ""
@echo "$(YELLOW)Available schemes:$(NC)"
@xcodebuild -list -workspace $(WORKSPACE) 2>/dev/null | grep -A 100 "Schemes:" | grep "^ " | sed 's/^ / - /'
@echo ""
@echo "$(YELLOW)Example:$(NC)"
@echo " make lint scheme=GiniBankSDK"
@echo " make lint scheme=GiniCaptureSDK"
.PHONY: list-schemes
list-schemes: ## List all available Xcode schemes
@echo "$(BLUE)Available schemes in $(WORKSPACE):$(NC)"
@xcodebuild -list -workspace $(WORKSPACE) 2>/dev/null | grep -A 100 "Schemes:" | grep "^ " | sed 's/^ / - /'
.PHONY: lint
lint: ## Lint/validate compilation for a specific scheme (requires scheme parameter)
bundle exec fastlane build_scheme target:"$(SCHEME)" destination:"platform=iOS Simulator,name=iPhone 15 Pro,OS=17.2"
.PHONY: clean
clean: ## Clean build artifacts
@echo "$(YELLOW)Cleaning build artifacts...$(NC)"
@xcodebuild clean \
-workspace $(WORKSPACE) \
-quiet 2>/dev/null || true
@rm -rf build/
@rm -rf DerivedData/
@rm -f /tmp/xcodebuild.log
@echo "$(GREEN)✓ Clean complete$(NC)"
.PHONY: lint-all-main
lint-all-main: ## Lint all main SDK schemes (GiniBankSDK, GiniCaptureSDK, GiniHealthSDK)
@echo "$(BLUE)======================================$(NC)"
@echo "$(BLUE)Linting all main SDK schemes$(NC)"
@echo "$(BLUE)======================================$(NC)"
@$(MAKE) lint scheme=GiniBankSDK
@$(MAKE) lint scheme=GiniCaptureSDK
@$(MAKE) lint scheme=GiniHealthSDK
@echo ""
@echo "$(GREEN)✓ All main SDKs validated successfully$(NC)"
# Default target
.DEFAULT_GOAL := help