-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (27 loc) · 1.36 KB
/
Makefile
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
setup:
rm -rf SwiftCompilationDatabase.xcodeproj
rm -rf outputs
mkdir outputs
xcodegen:
mint run yonaskolb/[email protected]
# Xcode 12.5.1 at the time of writing
generate_xcodebuild_log:
xcodebuild \
-project SwiftCompilationDatabase.xcodeproj \
-scheme "ModuleB" \
-destination generic/platform=MacOS \
clean build \
> outputs/xcodebuild.log
generate_compilation_database_from_xcodebuild:
swift run --package-path CompilationDatabaseGenerator CompilationDatabaseGenerator xcodebuild outputs/xcodebuild.log outputs/compile_commands.json
generate_compilation_database_from_bazel:
swift run --package-path CompilationDatabaseGenerator CompilationDatabaseGenerator bazel outputs/compile_commands.json
run_swiftlint_using_compilation_database:
mint run realm/[email protected] analyze --compile-commands outputs/compile_commands.json
run_swiftlint_using_xcodebuild_log:
mint run realm/[email protected] analyze --compiler-log-path outputs/xcodebuild.log
bazel_build:
bazelisk build -s ...
go_with_bazel_compilation_database: setup generate_compilation_database_from_bazel run_swiftlint_using_compilation_database
go_with_xcodebuild_compilation_database: setup xcodegen generate_xcodebuild_log generate_compilation_database_from_xcodebuild run_swiftlint_using_compilation_database
go_with_xcodebuild: setup xcodegen generate_xcodebuild_log run_swiftlint_using_xcodebuild_log