Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (36 loc) · 1.4 KB
/
Copy pathMakefile
File metadata and controls
45 lines (36 loc) · 1.4 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
.DEFAULT_GOAL := macOS_run
SAMPLE ?= HelloWorld
CONFIGURATION ?= Debug
SAMPLES := $(sort $(patsubst Samples/%/Project.swift,%,$(wildcard Samples/*/Project.swift)))
SIGNING_OPTIONS = $(if $(strip $(DEVELOPMENT_TEAM)),-allowProvisioningUpdates CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM="$(DEVELOPMENT_TEAM)")
ifneq ($(words $(SAMPLE)),1)
$(error Select one SAMPLE from: $(SAMPLES).)
endif
ifeq ($(filter $(SAMPLES),$(SAMPLE)),)
$(error Unknown SAMPLE '$(SAMPLE)'. Select from: $(SAMPLES).)
endif
.PHONY: apple_setup iOS macOS visionOS iOS_run macOS_run visionOS_run android_setup android linux_setup linux
apple_setup:
mise trust
mise install
mise exec -- tuist clean
mise exec -- tuist generate --no-open
iOS: DESTINATION ?= generic/platform=iOS Simulator
macOS: DESTINATION ?= platform=macOS
visionOS: DESTINATION ?= generic/platform=visionOS Simulator
iOS macOS visionOS:
mise exec -- xcodebuild \
-workspace OpenSwiftUISamples.xcworkspace \
-scheme "$(SAMPLE)App" \
-configuration "$(CONFIGURATION)" \
-destination "$(DESTINATION)" \
$(SIGNING_OPTIONS) \
build
iOS_run macOS_run visionOS_run:
mise exec -- xcrun python3 Scripts/run-apple.py \
"$(@:_run=)" --sample "$(SAMPLE)" --configuration "$(CONFIGURATION)" \
--destination "$(DESTINATION)" --development-team "$(DEVELOPMENT_TEAM)"
android_setup android:
@echo "Android is not supported yet."
linux_setup linux:
@echo "Linux is not supported yet."