-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
80 lines (67 loc) · 2.46 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
PLATFORM_IOS = iOS Simulator,name=iPhone 11 Pro Max
SCHEME = StargazersKit
default: test
archive-ios: archive-ios-release archive-ios-debug
archive-simulator: archive-simulator-release archive-simulator-debug
archive-all: clean archive-ios archive-simulator
framework: framework-release framework-debug
distribute: archive-all framework zip
test:
xcodebuild test \
-scheme $(SCHEME) \
-destination platform="$(PLATFORM_IOS)"
clean:
rm -f StargazersKit-*.zip
rm -rf ./build*
rm -rf ./artifacts*
archive-ios-release:
xcodebuild archive \
-scheme $(SCHEME) \
-configuration Release \
-destination 'generic/platform=iOS' \
-archivePath './build/$(SCHEME)-Release.framework.xcarchive' \
SKIP_INSTALL=NO \
BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
archive-simulator-release:
xcodebuild archive \
-scheme $(SCHEME) \
-configuration Release \
-destination 'generic/platform=iOS Simulator' \
-archivePath './build/$(SCHEME)-Release.framework-iphonesimulator.xcarchive' \
SKIP_INSTALL=NO \
BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
archive-ios-debug:
xcodebuild archive \
-scheme $(SCHEME) \
-configuration Debug \
-destination 'generic/platform=iOS' \
-archivePath './build/$(SCHEME)-Debug.framework.xcarchive' \
SKIP_INSTALL=NO \
BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
archive-simulator-debug:
xcodebuild archive \
-scheme $(SCHEME) \
-configuration Debug \
-destination 'generic/platform=iOS Simulator' \
-archivePath './build/$(SCHEME)-Debug.framework-iphonesimulator.xcarchive' \
SKIP_INSTALL=NO \
BUILD_LIBRARIES_FOR_DISTRIBUTION=YES
framework-release:
xcodebuild -create-xcframework \
-framework './build/$(SCHEME)-Release.framework.xcarchive/Products/Library/Frameworks/$(SCHEME).framework' \
-framework './build/$(SCHEME)-Release.framework-iphonesimulator.xcarchive/Products/Library/Frameworks/$(SCHEME).framework' \
-output './artifacts/$(SCHEME).xcframework'
framework-debug:
xcodebuild -create-xcframework \
-framework './build/$(SCHEME)-Debug.framework.xcarchive/Products/Library/Frameworks/$(SCHEME).framework' \
-framework './build/$(SCHEME)-Debug.framework-iphonesimulator.xcarchive/Products/Library/Frameworks/$(SCHEME).framework' \
-output './artifacts/$(SCHEME)-Debug.xcframework'
zip:
zip -qq -r $(SCHEME).xcframework.zip ./artifacts/$(SCHEME)*.xcframework
format:
swift format \
--ignore-unparsable-files \
--in-place \
--recursive \
./$(SCHEME) ./StargazersExample ./$(SCHEME)Tests \
--configuration swift-format.json