-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,28 @@ | ||
PLATFORM = iOS Simulator,name=iPhone 15 Pro Max | ||
PLATFORM_IOS = iOS Simulator,id=$(call udid_for,iPhone,iOS-16) | ||
PLATFORM_MACOS = macOS | ||
PLATFORM_MAC_CATALYST = macOS,variant=Mac Catalyst | ||
PLATFORM_TVOS = tvOS Simulator,id=$(call udid_for,TV,tvOS-16) | ||
PLATFORM_WATCHOS = watchOS Simulator,id=$(call udid_for,Watch,watchOS-9) | ||
|
||
test-library: | ||
xcodebuild test \ | ||
-workspace supabase-swift.xcworkspace \ | ||
-scheme Supabase-Package \ | ||
-destination platform="$(PLATFORM)" || exit 1; | ||
for platform in "$(PLATFORM_IOS)" "$(PLATFORM_MACOS)" "$(PLATFORM_MAC_CATALYST)" "$(PLATFORM_TVOS)" "$(PLATFORM_WATCHOS)"; do \ | ||
xcodebuild test \ | ||
-workspace supabase-swift.xcworkspace \ | ||
-scheme Supabase-Package \ | ||
-destination platform="$$platform" || exit 1; \ | ||
done; | ||
|
||
build-example: | ||
xcodebuild build \ | ||
-workspace supabase-swift.xcworkspace \ | ||
-scheme Examples \ | ||
-destination platform="$(PLATFORM)" || exit 1; | ||
-destination platform="$(PLATFORM_IOS)" || exit 1; | ||
|
||
format: | ||
@swift format -i -r . | ||
|
||
.PHONY: test-library build-example format | ||
|
||
define udid_for | ||
$(shell xcrun simctl list --json devices available $(1) | jq -r '.devices | to_entries | map(select(.value | add)) | sort_by(.key) | .[] | select(.key | contains("$(2)")) | .value | last.udid') | ||
endef |