forked from uhooi/iOSDC2020-Talk-Sample
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (46 loc) · 1.26 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
PRODUCT_NAME := UhooiPicBook
WORKSPACE_NAME := ${PRODUCT_NAME}.xcworkspace
SCHEME_NAME := ${PRODUCT_NAME}
UI_TESTS_TARGET_NAME := ${PRODUCT_NAME}UITests
TEST_SDK := iphonesimulator
TEST_CONFIGURATION := Debug
TEST_PLATFORM := iOS Simulator
TEST_DEVICE ?= iPhone 11 Pro Max
TEST_OS ?= 13.6
TEST_DESTINATION := 'platform=${TEST_PLATFORM},name=${TEST_DEVICE},OS=${TEST_OS}'
.PHONY: install-bundler
install-bundler:
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
.PHONY: install-cocoapods
install-cocoapods:
bundle exec pod install
.PHONY: install-carthage
install-carthage:
mint run carthage carthage bootstrap --platform iOS --cache-builds
.PHONY: generate-xcodeproj
generate-xcodeproj:
mint run xcodegen xcodegen generate
$(MAKE) install-cocoapods
.PHONY: build-debug
build-debug:
set -o pipefail \
&& xcodebuild \
-sdk ${TEST_SDK} \
-configuration ${TEST_CONFIGURATION} \
-workspace ${WORKSPACE_NAME} \
-scheme ${SCHEME_NAME} \
build \
| bundle exec xcpretty
.PHONY: test
test:
set -o pipefail \
&& xcodebuild \
-sdk ${TEST_SDK} \
-configuration ${TEST_CONFIGURATION} \
-workspace ${WORKSPACE_NAME} \
-scheme ${SCHEME_NAME} \
-destination ${TEST_DESTINATION} \
-skip-testing:${UI_TESTS_TARGET_NAME} \
clean test \
| bundle exec xcpretty --report html