-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
70 lines (58 loc) · 1.92 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
FIREBASE_VERSION := 10.22.0
.DEFAULT_GOAL := help
DEVELOP_NAME := MutaroDev
PRODUCTION_NAME := Mutaro
WORKSPACE_NAME := Mutaro.xcworkspace
TEST_SCHEME := MutaroDev
TEST_SDK := iphonesimulator
TEST_CONFIGURATION := Debug(Development)
TEST_PLATFORM := iOS Simulator
TEST_DEVICE ?= iPhone 14 Pro
TEST_OS ?= 16.1
TEST_DESTINATION := 'platform=${TEST_PLATFORM},name=${TEST_DEVICE},OS=${TEST_OS}'
.PHONY: download-firebase-sdk
download-firebase-sdk:
./scripts/download-firebase-sdk.sh $(FIREBASE_VERSION)
.PHONY: clean
clean: # Clear Cache
rm -rf ~/Library/Developer/Xcode/DerivedData/*;
xcodebuild clean --alltargets
.PHONY: build-debug-development-without-build
build-debug-development-without-build:
$(MAKE) build-debug-without-test PROJECT_NAME=${DEVELOP_NAME}
.PHONY: build-debug-production-without-build
build-debug-production-without-build:
$(MAKE) build-debug-without-test PROJECT_NAME=${PRODUCTION_NAME}
.PHONY: build-debug-development
build-debug-development:
$(MAKE) build-debug PROJECT_NAME=${DEVELOP_NAME}
.PHONY: build-debug-production
build-debug-production:
$(MAKE) build-debug PROJECT_NAME=${PRODUCTION_NAME}
.PHONY: build-debug
build-debug:
set -o pipefail \
&& xcodebuild \
-sdk '${TEST_SDK}' \
-configuration '${TEST_CONFIGURATION}' \
-workspace '${WORKSPACE_NAME}' \
-scheme '${TEST_SCHEME}' \
-destination ${TEST_DESTINATION} \
-clonedSourcePackagesDirPath './SourcePackages' \
-skipPackagePluginValidation \
clean build
.PHONY: build-debug-without-test
build-debug-without-test:
set -o pipefail \
&& xcodebuild test-without-building \
-sdk '${TEST_SDK}' \
-configuration '${TEST_CONFIGURATION}' \
-workspace '${WORKSPACE_NAME}' \
-scheme '${TEST_SCHEME}' \
-destination ${TEST_DESTINATION} \
-clonedSourcePackagesDirPath './SourcePackages' \
-skipPackagePluginValidation \
clean build
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?# .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":[^#]*? #| #"}; {printf "%-42s%s\n", $$1 $$3, $$2}'