-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (22 loc) · 1.37 KB
/
Makefile
File metadata and controls
30 lines (22 loc) · 1.37 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
generate: ## Generate projects, workspace and install pods
@$(MAKE) generate_assets generateprojects
generateprojects: ## Generate only .xcodeproj projects using Xcodegen
@echo "\nGenerating modules projects"
@find LearningJourney/Modules -type d -depth 2 -exec sh -c "cd {}; echo 'Generating {}'; [ -f ./project.yml ] && xcodegen" \;
@echo "\nGenerating main projects"
@(cd LearningJourney/App; xcodegen;)
generate_assets: ## Generate assets files using SwiftGen
@echo "\nGenerating asset files"
@find LearningJourney/Modules -type d -depth 2 -exec sh -c "cd {}; [ -f swiftgen.yml ] && echo 'Generating files for {}' && pwd | xargs basename | xargs -I % mkdir %/Sources/Generated; swiftgen" \; 2> /dev/null
open: ## Opens the main XCode project
@(open LearningJourney/App/LearningJourney.xcodeproj)
create_module: ## Create module. Usage: make create_module NAME=Name TYPE=FEATURE | CORE
./tools/Scripts/create_module.sh ${NAME} ${TYPE}
dep_graph: ## Copy GraphViz dependency graph to clipboard
@((cd LearningJourney/App; xcodegen dump --type graphviz) | pbcopy)
run_tests: ## Run automated tests
./tools/Scripts/run_tests.sh
clean: ## Cleanup projects
rm -rf LearningJourney/LearningJourney.xcworkspace
-@find LearningJourney -maxdepth 10 -d -name "Generated" -exec rm -r {} \; 2> /dev/null
-@find LearningJourney -maxdepth 10 -name "*.xcodeproj" -exec rm -r {} \; 2> /dev/null