forked from urbanairship/ios-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
110 lines (84 loc) · 2.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
XCODE ?= 12.4
export TEST_DESTINATION ?= platform=iOS Simulator,OS=latest,name=iPhone 11
export TEST_DESTINATION_TVOS ?= platform=tvOS Simulator,OS=latest,name=Apple TV
export DEVELOPER_DIR = $(shell bash ./scripts/get_xcode_path.sh ${XCODE} $(XCODE_PATH))
export AIRSHIP_VERSION = $(shell bash "./scripts/airship_version.sh")
build_path = build
derived_data_path = ${build_path}/derived_data
archive_path = ${build_path}/archive
xcframeworks_path = ${build_path}/xcframeworks
docs_path = ${build_path}/Documentation
package_zip_path = ${build_path}/Airship.zip
.PHONY: setup
setup:
test ${DEVELOPER_DIR}
bundle install --quiet
bundle exec pod install
.PHONY: all
all: setup build test pod-lint
.PHONY: build
build: build-package build-samples
.PHONY: build-package
build-package: clean-package build-docs build-xcframeworks
bash ./scripts/package.sh \
"${package_zip_path}" \
"${xcframeworks_path}/*.xcframework" \
"${docs_path}" \
CHANGELOG.md \
README.md \
LICENSE
.PHONY: build-docs
build-docs: setup clean-docs
bash ./scripts/build_docs.sh "${docs_path}"
.PHONY: build-xcframeworks
build-xcframeworks: setup clean-xcframeworks
bash ./scripts/build_xcframeworks.sh "${xcframeworks_path}" "${derived_data_path}" "${archive_path}"
.PHONY: build-samples
build-samples: build-sample-tvos build-sample-objc build-sample-swift
.PHONY: build-sample-tvos
build-sample-tvos: setup
bash ./scripts/build_sample.sh "tvOSSample" "${derived_data_path}"
.PHONY: build-sample-objc
build-sample-objc: setup
bash ./scripts/build_sample.sh "Sample" "${derived_data_path}"
.PHONY: build-sample-swift
build-sample-swift: setup
bash ./scripts/build_sample.sh "SwiftSample" "${derived_data_path}"
.PHONY: test
test: setup test-core test-accengage test-content-extension test-service-extension test-packages
.PHONY: test-core
test-core: setup
bash ./scripts/run_tests.sh AirshipCore "${derived_data_path}"
.PHONY: test-accengage
test-accengage: setup
bash ./scripts/run_tests.sh AirshipAccengage "${derived_data_path}"
.PHONY: test-content-extension
test-content-extension: setup
bash ./scripts/run_tests.sh AirshipNotificationContentExtension "${derived_data_path}"
.PHONY: test-service-extension
test-service-extension: setup
bash ./scripts/run_tests.sh AirshipNotificationServiceExtension "${derived_data_path}"
.PHONY: test-packages
test-packages: setup
bash ./scripts/test_package.sh spm
bash ./scripts/test_package.sh spm11.4
.PHONY: pod-publish
pod-publish: setup
bundle exec pod trunk push Airship.podspec
bundle exec pod trunk push AirshipExtensions.podspec
.PHONY: pod-lint
pod-lint: setup
bundle exec pod lib lint Airship.podspec --verbose
bundle exec pod lib lint AirshipExtensions.podspec
.PHONY: clean
clean:
rm -rf "${build_path}"
.PHONY: clean-docs
clean-docs:
rm -rf "${docs_path}"
.PHONY: clean-package
clean-package:
rm -rf "${package_zip_path}"
.PHONY: clean-xcframeworks
clean-xcframeworks:
rm -rf "${xcframeworks_output}"