forked from SRGSSR/pillarbox-apple
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
153 lines (132 loc) · 4.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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#!/usr/bin/xcrun make -f
CONFIGURATION_REPOSITORY_URL=https://github.com/SRGSSR/pillarbox-apple-configuration.git
CONFIGURATION_COMMIT_SHA1=e9cd78f090b9e73a7595b90140182989d4d8c7ef
.PHONY: all
all: help
.PHONY: setup
setup:
@echo "Setting up the project..."
@bundle install > /dev/null
@Scripts/checkout-configuration.sh "${CONFIGURATION_REPOSITORY_URL}" "${CONFIGURATION_COMMIT_SHA1}" Configuration
@echo "... done.\n"
.PHONY: fastlane
fastlane: setup
@bundle exec fastlane
.PHONY: archive-demo-ios
archive-demo-ios: setup
@bundle exec fastlane archive_demo_ios
.PHONY: archive-demo-tvos
archive-demo-tvos: setup
@bundle exec fastlane archive_demo_tvos
.PHONY: deliver-demo-nightly-ios
deliver-demo-nightly-ios: setup
@echo "Delivering demo nightly build for iOS..."
@bundle exec fastlane deliver_demo_nightly_ios
@echo "... done.\n"
.PHONY: deliver-demo-nightly-tvos
deliver-demo-nightly-tvos: setup
@echo "Delivering demo nightly build for tvOS..."
@bundle exec fastlane deliver_demo_nightly_tvos
@echo "... done.\n"
.PHONY: deliver-demo-release-ios
deliver-demo-release-ios: setup
@echo "Delivering demo release build for iOS..."
@bundle exec fastlane deliver_demo_release_ios
@echo "... done.\n"
.PHONY: deliver-demo-release-tvos
deliver-demo-release-tvos: setup
@echo "Delivering demo release build for tvOS..."
@bundle exec fastlane deliver_demo_release_tvos
@echo "... done.\n"
.PHONY: test-streams-start
test-streams-start:
@echo "Starting test streams"
@Scripts/test-streams.sh -s
@echo "... done.\n"
.PHONY: test-streams-stop
test-streams-stop:
@echo "Stopping test streams"
@Scripts/test-streams.sh -k
@echo "... done.\n"
.PHONY: test-ios
test-ios: setup
@echo "Running unit tests..."
@Scripts/test-streams.sh -s
@bundle exec fastlane test_ios
@Scripts/test-streams.sh -k
@echo "... done.\n"
.PHONY: test-tvos
test-tvos: setup
@echo "Running unit tests..."
@Scripts/test-streams.sh -s
@bundle exec fastlane test_tvos
@Scripts/test-streams.sh -k
@echo "... done.\n"
.PHONY: check-quality
check-quality: setup
@echo "Checking quality..."
@Scripts/check-quality.sh
@echo "... done.\n"
.PHONY: fix-quality
fix-quality: setup
@echo "Fixing quality..."
@Scripts/fix-quality.sh
@echo "... done.\n"
.PHONY: git-hook-install
git-hook-install:
@echo "Installing git hooks..."
@git config core.hooksPath hooks
@echo "... done.\n"
.PHONY: git-hook-uninstall
git-hook-uninstall:
@echo "Uninstalling git hooks..."
@git config --unset core.hooksPath
@echo "... done.\n"
.PHONY: spm-reload
spm-reload:
@echo "Remove dependencies..."
@swift package reset
@echo "... done.\n"
@echo "Reload dependencies..."
@swift package update
@echo "... done.\n"
.PHONY: doc
doc: setup
@echo "Generating documentation sets..."
@bundle exec fastlane doc
@echo "... done.\n"
.PHONY: help
help:
@echo "The following targets are available:"
@echo ""
@echo " all Default target"
@echo " setup Setup project"
@echo ""
@echo " fastlane Run fastlane"
@echo ""
@echo " archive-demo-ios Archive the iOS demo (for all configurations)"
@echo " archive-demo-tvos Archive the tvOS demo (for all configurations)"
@echo ""
@echo " deliver-demo-nightly-ios Deliver a demo nightly build for iOS"
@echo " deliver-demo-nightly-tvos Deliver a demo nightly build for tvOS"
@echo ""
@echo " deliver-demo-release-ios Deliver a demo release build for iOS"
@echo " deliver-demo-release-tvos Deliver a demo release build for tvOS"
@echo ""
@echo " test-streams-start Start servicing test streams"
@echo " test-streams-stop Stop servicing test streams"
@echo ""
@echo " test-ios Build and run unit tests for iOS"
@echo " test-tvos Build and run unit tests for tvOS"
@echo ""
@echo " check-quality Run quality checks"
@echo " fix-quality Fix quality automatically (if possible)"
@echo ""
@echo " git-hook-install Use hooks located in ./hooks"
@echo " git-hook-uninstall Use default hooks located in .git/hooks"
@echo ""
@echo " spm-reload Reload SPM dependencies"
@echo ""
@echo " doc Build the documentation"
@echo ""
@echo " help Display this help message"