forked from brunophilipe/Mastonaut
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathproject.yml
247 lines (236 loc) · 7.19 KB
/
project.yml
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
name: Mastonaut
options:
deploymentTarget:
macOS: "12.0" # FIXME is technically wrong for HSE
settingGroups:
versioning:
MARKETING_VERSION: "1.3.9"
CURRENT_PROJECT_VERSION: "135"
configFiles:
Debug: userspecific.xcconfig
Mock: userspecific.xcconfig
Release: userspecific.xcconfig
Release HSE: userspecific.xcconfig
configs:
Debug: debug
Mock: mock
Release: release
Release HSE: release-hse
fileGroups:
- userspecific.xcconfig # show in project
packages:
LoggingOSLog:
url: https://github.com/chrisaljoudi/swift-log-oslog.git
branch: master
FontPicker:
url: https://github.com/chucker/FontPicker.git
branch: main
Sdifft:
url: https://github.com/wzxhahaha/Sdifft
majorVersion: 2.0.0
Starscream:
url: https://github.com/daltoniam/Starscream.git
majorVersion: 3.1.0
SVGKit:
url: https://github.com/SVGKit/SVGKit
majorVersion: 3.0.0
DSFSparkline:
url: https://github.com/dagronf/DSFSparkline
majorVersion: 4.0.0
targets:
Mastonaut:
type: application
platform: macOS
settings:
base:
CODE_SIGN_ENTITLEMENTS: "Mastonaut/Supporting Files/Mastonaut.entitlements"
ENABLE_HARDENED_RUNTIME: true
INFOPLIST_FILE: "Mastonaut/Supporting Files/Info.plist"
SWIFT_OBJC_BRIDGING_HEADER: "Mastonaut/Supporting Files/Mastonaut-Bridging-Header.h"
INFOPLIST_KEY_LSApplicationCategoryType: "public.app-category.social-networking"
PRODUCT_BUNDLE_IDENTIFIER: "$(MASTONAUT_BUNDLE_ID_BASE).mac"
OTHER_LDFLAGS: "" # prevent framework autolink (Xcode 15A240d)
groups:
- versioning
configs:
Debug:
APP_ICON_NAME: "MastonautDebug"
AUTH_URL_SCHEME: "mastonaut-auth-debug"
Mock:
APP_ICON_NAME: "MastonautDebug"
AUTH_URL_SCHEME: "mastonaut-auth-debug"
Release:
APP_ICON_NAME: "Mastonaut"
AUTH_URL_SCHEME: "mastonaut-auth"
Release HSE:
APP_ICON_NAME: "Mastonaut"
AUTH_URL_SCHEME: "mastonaut-auth"
preBuildScripts:
- script: |
BUNDLE_VERSION=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleShortVersionString' $SRCROOT/Mastonaut/Supporting\ Files/Info.plist)
echo "#define BUNDLE_VERSION \"$MARKETING_VERSION\"" > $DERIVED_FILE_DIR/BundleVersions.h
inputFiles:
- "$(SRCROOT)/Mastonaut/Supporting Files/Info.plist"
outputFiles:
- "$(DERIVED_FILE_DIR)/BundleVersions.h"
name: "Generate Versions Header (Run Script)"
sources:
- path: Mastonaut
excludes:
- "Mocks/Data/*.json"
- "Supporting Files/*.sh"
- path: "CoreTootin/Extensions/Logger+CurrentType.swift"
- path: "CoreTootin/Supporting Files/BuildConfig.generated.swift"
- path: "CoreTootin/Supporting Files/CoreAssets.xcassets"
dependencies:
- sdk: AVKit.framework
embed: false
- package: FontPicker
- package: Sdifft
- package: Starscream
- package: SVGKit
- target: CoreTootin
- target: MastodonKit
- target: MastonautHelp
copyFiles:
destination: resources
- target: PullRefreshableScrollView
- target: QuickToot
copyFiles:
destination: plugins
Mastonaut (Mock): # FIXME: unclear if needed, or if this can be a config
type: application
platform: macOS
sources:
- path: Mastonaut
QuickToot:
type: app-extension
platform: macOS
settings:
base:
CODE_SIGN_ENTITLEMENTS: "QuickToot/QuickToot.entitlements"
ENABLE_HARDENED_RUNTIME: true
OTHER_LDFLAGS: "" # prevent framework autolink (Xcode 15A240d)
PRODUCT_BUNDLE_IDENTIFIER: "$(MASTONAUT_BUNDLE_ID_BASE).mac.QuickToot"
groups:
- versioning
sources:
- path: QuickToot
- path: "CoreTootin/Extensions/Logger+CurrentType.swift"
- path: "Mastonaut/Application/Mastonaut.icns"
dependencies:
- target: CoreTootin
MastonautTests:
type: bundle.unit-test
platform: macOS
sources:
- path: MastonautTests
dependencies:
- target: CoreTootin
- target: Mastonaut
settings:
base:
INFOPLIST_FILE: "MastonautTests/Info.plist"
OTHER_LDFLAGS: "" # prevent framework autolink (Xcode 15A240d)
PRODUCT_BUNDLE_IDENTIFIER: "$(MASTONAUT_BUNDLE_ID_BASE).tests"
CoreTootin:
type: framework
platform: macOS
preBuildScripts:
- script: |
"$PROJECT_DIR/Mastonaut/Supporting Files/BuildConfig.sh" \
> "${PROJECT_DIR}/CoreTootin/Supporting Files/BuildConfig.generated.swift"
outputFiles:
- "${PROJECT_DIR}/CoreTootin/Supporting Files/BuildConfig.generated.swift"
name: "Apply Build Config (Run Script)"
settings:
base:
OTHER_LDFLAGS: "" # prevent framework autolink (Xcode 15A240d)
PRODUCT_BUNDLE_IDENTIFIER: "$(MASTONAUT_BUNDLE_ID_BASE).coretootin"
sources:
- path: CoreTootin
excludes:
- "Extensions/Logger+CurrentType.swift"
dependencies:
- package: DSFSparkline
- package: LoggingOSLog
MastodonKit:
type: framework
platform: macOS
settings:
base:
GENERATE_INFOPLIST_FILE: true
OTHER_LDFLAGS: "" # prevent framework autolink (Xcode 15A240d)
sources:
- path: Dependencies/MastodonKit/Sources/MastodonKit
name: MastodonKit
MastonautHelp:
type: bundle
platform: macOS
info:
path: MastonautHelp/Info.plist
properties:
CFBundleSignature: "hbwr"
HPDBookAccessPath: "index.html"
HPDBookCSIndexPath: "search.cshelpindex"
HPDBookIconPath: "book-icon.png"
HPDBookIndexPath: "search.helpindex"
HPDBookTitle: "$(PROJECT_NAME) Help"
HPDBookType: "3"
settings:
base:
PRODUCT_BUNDLE_IDENTIFIER: "$(MASTONAUT_BUNDLE_ID_BASE).MastonautHelp"
WRAPPER_EXTENSION: "help"
sources:
- path: MastonautHelp/book-icon.png
- path: MastonautHelp/nav.js
- path: MastonautHelp/_English.lproj/InfoPlist.strings
postBuildScripts:
- script: |
cd MastonautHelp
# purge help cache
hiutil -P
source /opt/homebrew/opt/chruby/share/chruby/chruby.sh
source /opt/homebrew/opt/chruby/share/chruby/auto.sh
chruby ruby-3.1.3
/usr/bin/make --always-make
name: "Build Help (Run Script)"
outputFiles:
- "_site/nav.js"
PullRefreshableScrollView:
type: framework
platform: macOS
settings:
base:
OTHER_LDFLAGS: "" # prevent framework autolink (Xcode 15A240d)
sources:
- path: Dependencies/PullRefreshableScrollView/PullRefreshableScrollView
group: Dependencies
schemes:
Mastonaut:
build:
targets:
Mastonaut: all
MastonautTests: [test]
run:
config: Debug
test:
config: Debug
targets:
- MastonautTests
profile:
config: Debug
analyze:
config: Release
Mastonaut Release:
build:
targets:
Mastonaut: [build, run, profile, analyze, archive]
run:
config: Release
profile:
config: Release
analyze:
config: Release
archive:
config: Release