-
Notifications
You must be signed in to change notification settings - Fork 30
/
Makefile
21 lines (17 loc) · 610 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
PLATFORM_IOS = iOS Simulator,id=$(call udid_for,iOS 17.2,iPhone \d\+ Pro [^M])
test-compatibility:
xcodebuild \
-skipMacroValidation \
-project Example/Example.xcodeproj \
-scheme Compatibility \
-destination generic/platform="$(PLATFORM_IOS)"
format:
find . \
-path '*/Documentation.docc' -prune -o \
-name '*.swift' \
-not -path '*/.*' -print0 \
| xargs -0 swift format --ignore-unparsable-files --in-place
.PHONY: format test-compatibility
define udid_for
$(shell xcrun simctl list devices available '$(1)' | grep '$(2)' | sort -r | head -1 | awk -F '[()]' '{ print $$(NF-3) }')
endef