-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
49 lines (39 loc) · 1.59 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
# The installed SDKs are listed here.
# Note that this also depends on the runner image.
# macos-13 is now being used.
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
DEVICE_SDK=iphoneos17.2
SIMULATOR_SDK=iphonesimulator17.2
TEST_DESTINATION="platform=iOS Simulator,name=iPhone 15,OS=17.2"
GIT_HASH ?= git-$(shell git rev-parse --short=12 HEAD)
.PHONY: vendor
vendor:
bundle install
.PHONY: format
format:
swiftformat .
.PHONY: lint
lint:
swiftformat -lint .
.PHONY: clean
clean:
rm -rf ./build
.PHONY: framework
framework:
xcodebuild archive -sdk $(DEVICE_SDK) -workspace Authgear.xcworkspace -scheme Authgear-iOS -configuration Release -archivePath ./build/Release/$(DEVICE_SDK)/Authgear
xcodebuild archive -sdk $(SIMULATOR_SDK) -workspace Authgear.xcworkspace -scheme Authgear-iOS -configuration Release -archivePath ./build/Release/$(SIMULATOR_SDK)/Authgear
.PHONY: xcframework
xcframework:
xcodebuild -create-xcframework \
-framework ./build/Release/$(DEVICE_SDK)/Authgear.xcarchive/Products/Library/Frameworks/Authgear.framework \
-framework ./build/Release/$(SIMULATOR_SDK)/Authgear.xcarchive/Products/Library/Frameworks/Authgear.framework \
-output ./build/Release/Authgear.xcframework
.PHONY: build
build: framework
xcodebuild build -sdk $(SIMULATOR_SDK) -workspace Authgear.xcworkspace -scheme 'iOS-Example'
.PHONY: test
test:
xcodebuild -workspace Authgear.xcworkspace -scheme Authgear-iOS -destination ${TEST_DESTINATION} test
.PHONY: docs
docs:
bundle exec jazzy --module Authgear --title "Authgear iOS SDK $(GIT_HASH)" --hide-documentation-coverage