xcode_fastlane 1.1.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +91 -398
- data/CHANGELOG.md +12 -0
- data/fastlane/Fastfile +147 -40
- data/lib/xcode_fastlane/cli.rb +15 -6
- data/lib/xcode_fastlane/version.rb +1 -1
- data/lib/xcode_fastlane.rb +12 -0
- data/templates/fastlane/.env.beta +0 -0
- data/templates/fastlane/.env.ios +5 -0
- data/templates/fastlane/.env.mac +5 -0
- data/templates/fastlane/.env.release +0 -0
- data/templates/fastlane/Appfile +9 -4
- data/templates/fastlane/Deliverfile +10 -1
- data/templates/fastlane/Snapfile +0 -1
- metadata +39 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ec5914ef095a9a6fa672f369746a8b52fc01218a9ceb50e201783fc4bf6d50f
|
4
|
+
data.tar.gz: 2e65ff5de1bcf5d9fa25d1fe9962baf69a2c8f1cfeb94bd522b8fcc0a2d90524
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2238e88b0838bcc3603c4a32d738d123f4e9f3f119cc0b5110ff45259ee2b1da98ffd98b16f2da1d6924dd04f5b6bf42c122b3a6f84cee6008d1b325f0acf988
|
7
|
+
data.tar.gz: 3d47bbdccdebb564a66e160cbdfd4ba9e905a906c9eebdca72d18d695d22084fc4ac77224a6c684c95d675a5f5770cb55cea1254625c350369eb7238265b8f17
|
data/.rubocop.yml
CHANGED
@@ -1,430 +1,123 @@
|
|
1
1
|
---
|
2
2
|
require:
|
3
|
-
- rubocop-rake
|
4
3
|
- rubocop-rspec
|
5
4
|
|
6
5
|
AllCops:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
Enabled: false
|
14
|
-
|
15
|
-
FactoryBot:
|
16
|
-
Enabled: false
|
17
|
-
|
18
|
-
Gemspec/DeprecatedAttributeAssignment:
|
19
|
-
Enabled: true
|
20
|
-
|
21
|
-
Gemspec/DevelopmentDependencies:
|
22
|
-
Enabled: true
|
23
|
-
|
24
|
-
Gemspec/RequireMFA:
|
25
|
-
Enabled: true
|
26
|
-
|
27
|
-
Layout/LineContinuationLeadingSpace:
|
28
|
-
Enabled: true
|
29
|
-
|
30
|
-
Layout/LineContinuationSpacing:
|
31
|
-
Enabled: true
|
32
|
-
|
33
|
-
Layout/LineEndStringConcatenationIndentation:
|
34
|
-
Enabled: true
|
35
|
-
|
36
|
-
Layout/SpaceBeforeBrackets:
|
37
|
-
Enabled: true
|
38
|
-
|
39
|
-
Lint/AmbiguousAssignment:
|
40
|
-
Enabled: true
|
41
|
-
|
42
|
-
Lint/AmbiguousOperatorPrecedence:
|
43
|
-
Enabled: true
|
44
|
-
|
45
|
-
Lint/AmbiguousRange:
|
46
|
-
Enabled: true
|
47
|
-
|
48
|
-
Lint/ConstantOverwrittenInRescue:
|
49
|
-
Enabled: true
|
50
|
-
|
51
|
-
Lint/DeprecatedConstants:
|
52
|
-
Enabled: true
|
53
|
-
|
54
|
-
Lint/DuplicateBranch:
|
55
|
-
Enabled: true
|
56
|
-
|
57
|
-
Lint/DuplicateMagicComment:
|
58
|
-
Enabled: true
|
59
|
-
|
60
|
-
Lint/DuplicateMatchPattern:
|
61
|
-
Enabled: true
|
62
|
-
|
63
|
-
Lint/DuplicateRegexpCharacterClassElement:
|
64
|
-
Enabled: true
|
65
|
-
|
66
|
-
Lint/EmptyBlock:
|
67
|
-
Enabled: true
|
68
|
-
|
69
|
-
Lint/EmptyClass:
|
70
|
-
Enabled: true
|
71
|
-
|
72
|
-
Lint/EmptyInPattern:
|
73
|
-
Enabled: true
|
74
|
-
|
75
|
-
Lint/IncompatibleIoSelectWithFiberScheduler:
|
76
|
-
Enabled: true
|
77
|
-
|
78
|
-
Lint/ItWithoutArgumentsInBlock:
|
79
|
-
Enabled: true
|
80
|
-
|
81
|
-
Lint/LambdaWithoutLiteralBlock:
|
82
|
-
Enabled: true
|
83
|
-
|
84
|
-
Lint/LiteralAssignmentInCondition:
|
85
|
-
Enabled: true
|
86
|
-
|
87
|
-
Lint/MixedCaseRange:
|
88
|
-
Enabled: true
|
89
|
-
|
90
|
-
Lint/NoReturnInBeginEndBlocks:
|
91
|
-
Enabled: true
|
92
|
-
|
93
|
-
Lint/NonAtomicFileOperation:
|
94
|
-
Enabled: true
|
95
|
-
|
96
|
-
Lint/NumberedParameterAssignment:
|
97
|
-
Enabled: true
|
98
|
-
|
99
|
-
Lint/OrAssignmentToConstant:
|
100
|
-
Enabled: true
|
101
|
-
|
102
|
-
Lint/RedundantDirGlobSort:
|
103
|
-
Enabled: true
|
6
|
+
DisplayCopNames: true
|
7
|
+
DisplayStyleGuide: true
|
8
|
+
NewCops: enable
|
9
|
+
StyleGuideBaseURL: https://rubystyle.guide
|
10
|
+
SuggestExtensions: false
|
11
|
+
TargetRubyVersion: 3.0
|
104
12
|
|
105
|
-
|
106
|
-
|
13
|
+
Bundler/OrderedGems:
|
14
|
+
TreatCommentsAsGroupSeparators: false
|
107
15
|
|
108
|
-
|
109
|
-
|
16
|
+
Layout/IndentationStyle:
|
17
|
+
IndentationWidth: 2
|
110
18
|
|
111
|
-
|
112
|
-
|
19
|
+
Layout/LineLength:
|
20
|
+
Max: 140
|
113
21
|
|
114
|
-
|
115
|
-
Enabled:
|
116
|
-
|
117
|
-
Lint/SymbolConversion:
|
118
|
-
Enabled: true
|
119
|
-
|
120
|
-
Lint/ToEnumArguments:
|
121
|
-
Enabled: true
|
122
|
-
|
123
|
-
Lint/TripleQuotes:
|
124
|
-
Enabled: true
|
125
|
-
|
126
|
-
Lint/UnexpectedBlockArity:
|
127
|
-
Enabled: true
|
128
|
-
|
129
|
-
Lint/UnmodifiedReduceAccumulator:
|
130
|
-
Enabled: true
|
131
|
-
|
132
|
-
Lint/UselessRescue:
|
133
|
-
Enabled: true
|
134
|
-
|
135
|
-
Lint/UselessRuby2Keywords:
|
136
|
-
Enabled: true
|
137
|
-
|
138
|
-
Metrics/CollectionLiteralLength:
|
139
|
-
Enabled: true
|
140
|
-
|
141
|
-
Naming/BlockForwarding:
|
142
|
-
Enabled: true
|
143
|
-
|
144
|
-
RSpec/BeEmpty:
|
145
|
-
Enabled: true
|
146
|
-
|
147
|
-
RSpec/BeEq:
|
148
|
-
Enabled: true
|
149
|
-
|
150
|
-
RSpec/BeNil:
|
151
|
-
Enabled: true
|
152
|
-
|
153
|
-
RSpec/ChangeByZero:
|
154
|
-
Enabled: true
|
155
|
-
|
156
|
-
RSpec/ContainExactly:
|
157
|
-
Enabled: true
|
158
|
-
|
159
|
-
RSpec/DuplicatedMetadata:
|
160
|
-
Enabled: true
|
161
|
-
|
162
|
-
RSpec/EmptyMetadata:
|
163
|
-
Enabled: true
|
164
|
-
|
165
|
-
RSpec/EmptyOutput:
|
166
|
-
Enabled: true
|
167
|
-
|
168
|
-
RSpec/Eq:
|
169
|
-
Enabled: true
|
170
|
-
|
171
|
-
RSpec/ExcessiveDocstringSpacing:
|
172
|
-
Enabled: true
|
173
|
-
|
174
|
-
RSpec/IdenticalEqualityAssertion:
|
175
|
-
Enabled: true
|
176
|
-
|
177
|
-
RSpec/IndexedLet:
|
178
|
-
Enabled: true
|
179
|
-
|
180
|
-
RSpec/IsExpectedSpecify:
|
181
|
-
Enabled: true
|
182
|
-
|
183
|
-
RSpec/MatchArray:
|
184
|
-
Enabled: true
|
185
|
-
|
186
|
-
RSpec/MetadataStyle:
|
187
|
-
Enabled: true
|
188
|
-
|
189
|
-
RSpec/NoExpectationExample:
|
190
|
-
Enabled: true
|
191
|
-
|
192
|
-
RSpec/PendingWithoutReason:
|
193
|
-
Enabled: true
|
22
|
+
Metrics/AbcSize:
|
23
|
+
Enabled: false
|
194
24
|
|
195
|
-
|
196
|
-
|
25
|
+
Metrics/BlockLength:
|
26
|
+
Exclude:
|
27
|
+
- fastlane/*
|
28
|
+
- templates/fastlane/*
|
29
|
+
AllowedMethods:
|
30
|
+
- context
|
31
|
+
- define
|
32
|
+
- describe
|
33
|
+
- factory
|
34
|
+
- group
|
35
|
+
- shared_examples
|
36
|
+
|
37
|
+
Metrics/ClassLength:
|
38
|
+
Max: 320
|
39
|
+
|
40
|
+
Metrics/CyclomaticComplexity:
|
41
|
+
Max: 8
|
42
|
+
|
43
|
+
Metrics/MethodLength:
|
44
|
+
Enabled: false
|
197
45
|
|
198
|
-
|
199
|
-
|
46
|
+
Metrics/PerceivedComplexity:
|
47
|
+
Max: 10
|
200
48
|
|
201
|
-
|
202
|
-
|
49
|
+
Naming/FileName:
|
50
|
+
Exclude:
|
51
|
+
- Guardfile
|
203
52
|
|
204
|
-
|
205
|
-
Enabled:
|
53
|
+
Naming/PredicateName:
|
54
|
+
Enabled: false
|
206
55
|
|
207
|
-
RSpec/
|
208
|
-
|
56
|
+
RSpec/ContextWording:
|
57
|
+
Prefixes:
|
58
|
+
- and
|
59
|
+
- as
|
60
|
+
- for
|
61
|
+
- when
|
62
|
+
- with
|
63
|
+
- without
|
209
64
|
|
210
|
-
RSpec/
|
211
|
-
|
65
|
+
RSpec/ExampleLength:
|
66
|
+
Max: 13
|
212
67
|
|
213
|
-
RSpec/
|
214
|
-
Enabled:
|
68
|
+
RSpec/FilePath:
|
69
|
+
Enabled: false
|
215
70
|
|
216
71
|
RSpec/SpecFilePathFormat:
|
217
|
-
Enabled:
|
218
|
-
|
219
|
-
RSpec/SpecFilePathSuffix:
|
220
|
-
Enabled: true
|
221
|
-
|
222
|
-
RSpec/SubjectDeclaration:
|
223
|
-
Enabled: true
|
224
|
-
|
225
|
-
RSpec/UndescriptiveLiteralsDescription:
|
226
|
-
Enabled: true
|
227
|
-
|
228
|
-
RSpec/VerifiedDoubleReference:
|
229
|
-
Enabled: true
|
230
|
-
|
231
|
-
RSpecRails/AvoidSetupHook:
|
232
|
-
Enabled: true
|
233
|
-
|
234
|
-
RSpecRails/HaveHttpStatus:
|
235
|
-
Enabled: true
|
236
|
-
|
237
|
-
RSpecRails/InferredSpecType:
|
238
|
-
Enabled: true
|
239
|
-
|
240
|
-
RSpecRails/MinitestAssertions:
|
241
|
-
Enabled: true
|
242
|
-
|
243
|
-
RSpecRails/NegationBeValid:
|
244
|
-
Enabled: true
|
245
|
-
|
246
|
-
RSpecRails/TravelAround:
|
247
|
-
Enabled: true
|
248
|
-
|
249
|
-
Security/CompoundHash:
|
250
|
-
Enabled: true
|
251
|
-
|
252
|
-
Security/IoMethods:
|
253
|
-
Enabled: true
|
254
|
-
|
255
|
-
Style/ArgumentsForwarding:
|
256
|
-
Enabled: true
|
257
|
-
|
258
|
-
Style/ArrayIntersect:
|
259
|
-
Enabled: true
|
260
|
-
|
261
|
-
Style/CollectionCompact:
|
262
|
-
Enabled: true
|
263
|
-
|
264
|
-
Style/ComparableClamp:
|
265
|
-
Enabled: true
|
266
|
-
|
267
|
-
Style/ConcatArrayLiterals:
|
268
|
-
Enabled: true
|
269
|
-
|
270
|
-
Style/DataInheritance:
|
271
|
-
Enabled: true
|
272
|
-
|
273
|
-
Style/DirEmpty:
|
274
|
-
Enabled: true
|
275
|
-
|
276
|
-
Style/DocumentDynamicEvalDefinition:
|
277
|
-
Enabled: true
|
278
|
-
|
279
|
-
Style/EmptyHeredoc:
|
280
|
-
Enabled: true
|
281
|
-
|
282
|
-
Style/EndlessMethod:
|
283
|
-
Enabled: true
|
284
|
-
|
285
|
-
Style/EnvHome:
|
286
|
-
Enabled: true
|
287
|
-
|
288
|
-
Style/ExactRegexpMatch:
|
289
|
-
Enabled: true
|
290
|
-
|
291
|
-
Style/FetchEnvVar:
|
292
|
-
Enabled: true
|
293
|
-
|
294
|
-
Style/FileEmpty:
|
295
|
-
Enabled: true
|
296
|
-
|
297
|
-
Style/FileRead:
|
298
|
-
Enabled: true
|
299
|
-
|
300
|
-
Style/FileWrite:
|
301
|
-
Enabled: true
|
302
|
-
|
303
|
-
Style/HashConversion:
|
304
|
-
Enabled: true
|
305
|
-
|
306
|
-
Style/HashExcept:
|
307
|
-
Enabled: true
|
308
|
-
|
309
|
-
Style/IfWithBooleanLiteralBranches:
|
310
|
-
Enabled: true
|
311
|
-
|
312
|
-
Style/InPatternThen:
|
313
|
-
Enabled: true
|
314
|
-
|
315
|
-
Style/MagicCommentFormat:
|
316
|
-
Enabled: true
|
317
|
-
|
318
|
-
Style/MapCompactWithConditionalBlock:
|
319
|
-
Enabled: true
|
320
|
-
|
321
|
-
Style/MapIntoArray:
|
322
|
-
Enabled: true
|
323
|
-
|
324
|
-
Style/MapToHash:
|
325
|
-
Enabled: true
|
326
|
-
|
327
|
-
Style/MapToSet:
|
328
|
-
Enabled: true
|
329
|
-
|
330
|
-
Style/MinMaxComparison:
|
331
|
-
Enabled: true
|
332
|
-
|
333
|
-
Style/MultilineInPatternThen:
|
334
|
-
Enabled: true
|
335
|
-
|
336
|
-
Style/NegatedIfElseCondition:
|
337
|
-
Enabled: true
|
338
|
-
|
339
|
-
Style/NestedFileDirname:
|
340
|
-
Enabled: true
|
341
|
-
|
342
|
-
Style/NilLambda:
|
343
|
-
Enabled: true
|
344
|
-
|
345
|
-
Style/NumberedParameters:
|
346
|
-
Enabled: true
|
347
|
-
|
348
|
-
Style/NumberedParametersLimit:
|
349
|
-
Enabled: true
|
350
|
-
|
351
|
-
Style/ObjectThen:
|
352
|
-
Enabled: true
|
353
|
-
|
354
|
-
Style/OpenStructUse:
|
355
|
-
Enabled: true
|
356
|
-
|
357
|
-
Style/OperatorMethodCall:
|
358
|
-
Enabled: true
|
359
|
-
|
360
|
-
Style/QuotedSymbols:
|
361
|
-
Enabled: true
|
362
|
-
|
363
|
-
Style/RedundantArgument:
|
364
|
-
Enabled: true
|
365
|
-
|
366
|
-
Style/RedundantArrayConstructor:
|
367
|
-
Enabled: true
|
368
|
-
|
369
|
-
Style/RedundantConstantBase:
|
370
|
-
Enabled: true
|
371
|
-
|
372
|
-
Style/RedundantCurrentDirectoryInPath:
|
373
|
-
Enabled: true
|
374
|
-
|
375
|
-
Style/RedundantDoubleSplatHashBraces:
|
376
|
-
Enabled: true
|
377
|
-
|
378
|
-
Style/RedundantEach:
|
379
|
-
Enabled: true
|
380
|
-
|
381
|
-
Style/RedundantFilterChain:
|
382
|
-
Enabled: true
|
72
|
+
Enabled: false
|
383
73
|
|
384
|
-
|
385
|
-
|
74
|
+
RSpec/MultipleExpectations:
|
75
|
+
Max: 7
|
386
76
|
|
387
|
-
|
388
|
-
|
77
|
+
RSpec/MultipleMemoizedHelpers:
|
78
|
+
Max: 6
|
389
79
|
|
390
|
-
|
391
|
-
Enabled:
|
80
|
+
RSpec/NamedSubject:
|
81
|
+
Enabled: false
|
392
82
|
|
393
|
-
|
394
|
-
|
83
|
+
RSpec/NestedGroups:
|
84
|
+
Max: 5
|
395
85
|
|
396
|
-
|
397
|
-
Enabled:
|
86
|
+
RSpec/VerifiedDoubles:
|
87
|
+
Enabled: false
|
398
88
|
|
399
|
-
Style/
|
400
|
-
|
89
|
+
Style/BlockDelimiters:
|
90
|
+
EnforcedStyle: semantic
|
91
|
+
Exclude:
|
92
|
+
- spec/factories/*.rb
|
93
|
+
AllowedMethods:
|
94
|
+
- html
|
95
|
+
- let
|
96
|
+
- let!
|
97
|
+
- sequence
|
98
|
+
- subject
|
99
|
+
- watch
|
100
|
+
|
101
|
+
Style/Copyright:
|
102
|
+
Enabled: false
|
401
103
|
|
402
|
-
Style/
|
403
|
-
Enabled:
|
104
|
+
Style/Documentation:
|
105
|
+
Enabled: false
|
404
106
|
|
405
|
-
Style/
|
406
|
-
|
107
|
+
Style/EmptyMethod:
|
108
|
+
EnforcedStyle: expanded
|
407
109
|
|
408
|
-
Style/
|
409
|
-
|
110
|
+
Style/FormatString:
|
111
|
+
EnforcedStyle: format
|
410
112
|
|
411
|
-
Style/
|
412
|
-
|
113
|
+
Style/MethodCallWithArgsParentheses:
|
114
|
+
AllowedMethods:
|
115
|
+
- desc
|
413
116
|
|
414
|
-
Style/
|
415
|
-
|
117
|
+
Style/MixinUsage:
|
118
|
+
Exclude:
|
119
|
+
- bin/setup
|
120
|
+
- bin/update
|
416
121
|
|
417
122
|
Style/StringLiterals:
|
418
123
|
EnforcedStyle: double_quotes
|
419
|
-
|
420
|
-
Style/StringLiteralsInInterpolation:
|
421
|
-
EnforcedStyle: double_quotes
|
422
|
-
|
423
|
-
Style/SuperWithArgsParentheses:
|
424
|
-
Enabled: true
|
425
|
-
|
426
|
-
Style/SwapValues:
|
427
|
-
Enabled: true
|
428
|
-
|
429
|
-
Style/YAMLFileRead:
|
430
|
-
Enabled: true
|
data/CHANGELOG.md
CHANGED
data/fastlane/Fastfile
CHANGED
@@ -6,56 +6,149 @@ opt_out_usage
|
|
6
6
|
default_platform(:ios)
|
7
7
|
|
8
8
|
platform :ios do
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
9
|
+
before_all do
|
10
|
+
Dotenv.load ".env.ios"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
platform :mac do
|
15
|
+
before_all do
|
16
|
+
Dotenv.load ".env.mac"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
platform :ios do
|
21
|
+
desc "Create app on Apple Developer and App Store Connect"
|
22
|
+
lane :create_app do
|
23
|
+
create_app_online # produce
|
24
|
+
end
|
25
|
+
|
26
|
+
desc "Prepare Xcode project for use with match code signing"
|
27
|
+
lane :prepare_for_match do
|
28
|
+
update_code_signing_settings
|
29
|
+
match
|
30
|
+
end
|
31
|
+
|
32
|
+
desc "Prepare app for use with auto versioning.\n"
|
33
|
+
desc "Param `commit: true` to commit changes.\n"
|
34
|
+
desc "Required once locally."
|
35
|
+
lane :prepare_for_versioning do |options|
|
36
|
+
prepare_versioning
|
37
|
+
if options[:commit]
|
38
|
+
git_commit(allow_nothing_to_commit: true,
|
39
|
+
message: "build: update versioning system",
|
40
|
+
path: ["*.plist", "*.pbxproj"])
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
desc "Sync certificates"
|
45
|
+
lane :sync_certs_and_profiles do |options|
|
46
|
+
if options[:auto]
|
47
|
+
get_certificates # invokes cert
|
48
|
+
get_provisioning_profile # invokes sigh
|
49
|
+
else
|
50
|
+
sync_code_signing({ readonly: true, type: "appstore" }) # invokes match
|
51
|
+
update_code_signing_settings(
|
52
|
+
profile_name: lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING][ENV.fetch("APP_IDENTIFIER", nil)]
|
53
|
+
)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
desc "Write release notes"
|
58
|
+
lane :write_release_notes do |options|
|
59
|
+
content = options[:text]
|
60
|
+
UI.user_error!("No changelog passed.") if content.nil?
|
61
|
+
|
62
|
+
release_notes_file = Dir.glob("**/default/release_notes.txt").first
|
63
|
+
UI.user_error!("No default release notes file found.") if release_notes_file.nil?
|
64
|
+
|
65
|
+
File.write(release_notes_file, content)
|
66
|
+
return release_notes_file
|
67
|
+
end
|
68
|
+
|
69
|
+
desc "Ensure to be on a release branch for the next release"
|
70
|
+
lane :ensure_release_branch_and_version do
|
71
|
+
unless branch_name.start_with?(ENV["RELEASE_BRANCH_PREFIX"])
|
72
|
+
if get_versioning_info
|
73
|
+
new_version = lane_context[SharedValues::SEMVER_NEW_VERSION]
|
74
|
+
UI.message("New version: #{new_version}")
|
75
|
+
|
76
|
+
# new branch
|
77
|
+
XcodeFastlane.checkout_branch("#{ENV.fetch('RELEASE_BRANCH_PREFIX', nil)}#{new_version}")
|
78
|
+
|
79
|
+
file = write_release_notes(text: lane_context[SharedValues::SEMVER_NEW_CHANGELOG])
|
80
|
+
git_add(path: file)
|
81
|
+
|
82
|
+
# Create version via commitizen
|
83
|
+
semantic_bump
|
84
|
+
else
|
85
|
+
UI.user_error!("No new version to bump.")
|
86
|
+
end
|
87
|
+
end
|
19
88
|
end
|
20
89
|
|
21
|
-
desc "
|
22
|
-
lane :
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
90
|
+
desc "Create ipa"
|
91
|
+
lane :build do
|
92
|
+
sync_certs_and_profiles
|
93
|
+
# Commit changes made by match
|
94
|
+
git_commit(
|
95
|
+
allow_nothing_to_commit: true,
|
96
|
+
message: "build: update certificate and provision setting",
|
97
|
+
path: ["*.plist", "*.pbxproj"]
|
29
98
|
)
|
99
|
+
|
100
|
+
# Increases the build number by 1
|
101
|
+
old_build_number = get_build_number
|
102
|
+
increment_build_number
|
103
|
+
|
104
|
+
# Creates a signed file
|
105
|
+
build_app # invokes gym
|
106
|
+
|
107
|
+
commit_version_bump(message: "bump: build #{old_build_number} → #{lane_context[SharedValues::BUILD_NUMBER]}")
|
30
108
|
end
|
31
109
|
|
32
|
-
desc "
|
33
|
-
|
34
|
-
lane :upload_appstore_data do |options|
|
110
|
+
desc "Take screenshots."
|
111
|
+
lane :screenshot do
|
35
112
|
capture_screenshots(scheme: ENV.fetch("IOS_SCHEME", nil))
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
113
|
+
end
|
114
|
+
|
115
|
+
desc "Upload to App Store."
|
116
|
+
lane :upload_testflight do
|
117
|
+
app_store_connect_api_key
|
118
|
+
testflight # invokes pilot
|
119
|
+
end
|
120
|
+
|
121
|
+
desc "Upload to App Store."
|
122
|
+
lane :upload_appstore do
|
123
|
+
app_store_connect_api_key
|
124
|
+
upload_to_app_store # invokes deliver
|
125
|
+
end
|
126
|
+
|
127
|
+
desc "Create release branch, build, and upload to TestFlight."
|
128
|
+
lane :beta do
|
129
|
+
run_tests # invokes scan
|
130
|
+
ensure_release_branch_and_version
|
131
|
+
build
|
132
|
+
upload_testflight
|
133
|
+
rescue StandardError => e
|
134
|
+
on_error(e)
|
135
|
+
raise
|
136
|
+
else
|
137
|
+
on_success("Beta build finished and uploaded to TestFlight")
|
138
|
+
end
|
139
|
+
|
140
|
+
desc "Create app, screenshot, build and upload."
|
141
|
+
lane :release_app do
|
142
|
+
create_app
|
143
|
+
ensure_release_branch_and_version
|
144
|
+
build
|
145
|
+
screenshot
|
146
|
+
upload_appstore
|
54
147
|
rescue StandardError => e
|
55
148
|
on_error(e)
|
56
149
|
raise
|
57
150
|
else
|
58
|
-
on_success("
|
151
|
+
on_success("Build and upload to AppStore finished.")
|
59
152
|
end
|
60
153
|
end
|
61
154
|
|
@@ -67,6 +160,7 @@ def on_success(message, **_props)
|
|
67
160
|
success: true,
|
68
161
|
slack_url: ENV.fetch("FASTLANE_SLACK_URL", nil),
|
69
162
|
payload: {
|
163
|
+
"Build Number" => lane_context[SharedValues::BUILD_NUMBER],
|
70
164
|
"CI Build Number" => ENV.fetch("CI_BUILD_NUMBER", nil),
|
71
165
|
"CI Workflow" => ENV.fetch("CI_WORKFLOW", nil)
|
72
166
|
}
|
@@ -81,6 +175,7 @@ def on_error(exception)
|
|
81
175
|
success: false,
|
82
176
|
slack_url: ENV.fetch("FASTLANE_SLACK_URL", nil),
|
83
177
|
payload: {
|
178
|
+
"Build Number" => lane_context[SharedValues::BUILD_NUMBER],
|
84
179
|
"CI Build Number" => ENV.fetch("CI_BUILD_NUMBER", nil),
|
85
180
|
"CI Workflow" => ENV.fetch("CI_WORKFLOW", nil)
|
86
181
|
},
|
@@ -95,3 +190,15 @@ def on_error(exception)
|
|
95
190
|
}
|
96
191
|
)
|
97
192
|
end
|
193
|
+
|
194
|
+
private_lane :get_app_category do
|
195
|
+
app_category = nil
|
196
|
+
project = Xcodeproj::Project.open("../#{ENV.fetch('PROJECT_XCODEPROJ', nil)}")
|
197
|
+
project.objects.each do |object|
|
198
|
+
if object.isa == "XCBuildConfiguration" && object.name == "Release"
|
199
|
+
app_category = object.build_settings["INFOPLIST_KEY_LSApplicationCategoryType"]
|
200
|
+
break if app_category
|
201
|
+
end
|
202
|
+
end
|
203
|
+
app_category
|
204
|
+
end
|
data/lib/xcode_fastlane/cli.rb
CHANGED
@@ -13,12 +13,21 @@ module XcodeFastlane
|
|
13
13
|
|
14
14
|
desc "init", "Initialize fastlane setup"
|
15
15
|
def init
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
%w[
|
17
|
+
.gitignore
|
18
|
+
Gemfile
|
19
|
+
fastlane/.env.beta
|
20
|
+
fastlane/.env.ios
|
21
|
+
fastlane/.env.mac
|
22
|
+
fastlane/.env.release
|
23
|
+
fastlane/Appfile
|
24
|
+
fastlane/Fastfile
|
25
|
+
fastlane/Snapfile
|
26
|
+
].each do |file|
|
27
|
+
copy_file file
|
28
|
+
end
|
22
29
|
end
|
30
|
+
|
31
|
+
# TODO: run deliver init and overwrite with Deliverfile
|
23
32
|
end
|
24
33
|
end
|
data/lib/xcode_fastlane.rb
CHANGED
@@ -11,6 +11,18 @@ module XcodeFastlane
|
|
11
11
|
@project ||= Xcodeproj::Project.open(Pathname.glob("../*.xcodeproj").first)
|
12
12
|
end
|
13
13
|
|
14
|
+
# Returns the first target
|
15
|
+
def self.target
|
16
|
+
project.targets.first
|
17
|
+
end
|
18
|
+
|
19
|
+
# Generates an SKU
|
20
|
+
# Requires environment: PRODUCE_PLATFORM to be set.
|
21
|
+
def self.sku
|
22
|
+
platform = ENV.fetch("PRODUCE_PLATFORM")
|
23
|
+
CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) + ".#{platform}"
|
24
|
+
end
|
25
|
+
|
14
26
|
# Returns product bundle identifier for the given target or the first one found, if target_name is nil.
|
15
27
|
#
|
16
28
|
# Arguments:
|
File without changes
|
File without changes
|
data/templates/fastlane/Appfile
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
require "xcode_fastlane"
|
2
2
|
|
3
3
|
mandatory_environment = %w[
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
APP_STORE_CONNECT_KEY_KEY_ID
|
5
|
+
APP_STORE_CONNECT_KEY_ISSUER_ID
|
6
|
+
APP_STORE_CONNECT_KEY_KEY
|
7
7
|
FASTLANE_REVIEW_EMAIL
|
8
8
|
FASTLANE_REVIEW_FIRSTNAME
|
9
9
|
FASTLANE_REVIEW_LASTNAME
|
10
10
|
FASTLANE_REVIEW_PHONE
|
11
|
+
FASTLANE_TEAM_ID
|
11
12
|
FASTLANE_USER
|
13
|
+
GITHUB_API_TOKEN
|
12
14
|
]
|
13
15
|
# Optional:
|
14
16
|
# FASTLANE_SLACK_URL
|
@@ -25,11 +27,14 @@ mandatory_environment.each do |var|
|
|
25
27
|
ENV[var] or abort "Missing environment variable: #{var}"
|
26
28
|
end
|
27
29
|
|
28
|
-
|
30
|
+
ENV["APP_IDENTIFIER"] = ENV["CI_BUNDLE_ID"] || XcodeFastlane.product_bundle_id
|
29
31
|
ENV["PRODUCT_NAME"] = ENV["CI_PRODUCT"] || XcodeFastlane.product_name
|
30
32
|
ENV["APP_NAME"] = ENV["PRODUCT_NAME"]
|
31
33
|
ENV["IOS_IPA_OUTPUT_NAME"] = ENV["PRODUCT_NAME"]
|
32
34
|
ENV["IOS_SCHEME"] = ENV["CI_XCODE_SCHEME"] || XcodeFastlane.product_name
|
35
|
+
ENV["RELEASE_BRANCH_PREFIX"] = "releases/"
|
36
|
+
|
37
|
+
app_identifier(ENV["APP_IDENTIFIER"])
|
33
38
|
|
34
39
|
# For more information about the Appfile, see:
|
35
40
|
# https://docs.fastlane.tools/advanced/#appfile
|
@@ -3,5 +3,14 @@
|
|
3
3
|
# The Deliverfile allows you to store various App Store Connect metadata
|
4
4
|
# For more information, check out the docs
|
5
5
|
# https://docs.fastlane.tools/actions/deliver/
|
6
|
-
|
6
|
+
app_review_information(
|
7
|
+
first_name: ENV.fetch("FASTLANE_REVIEW_FIRSTNAME", nil),
|
8
|
+
last_name: ENV.fetch("FASTLANE_REVIEW_LASTNAME", nil),
|
9
|
+
phone_number: ENV.fetch("FASTLANE_REVIEW_PHONE", nil),
|
10
|
+
email_address: ENV.fetch("FASTLANE_REVIEW_EMAIL", nil)
|
11
|
+
)
|
12
|
+
copyright("#{Time.now.year} #{ENV.fetch('FASTLANE_REVIEW_FIRSTNAME', nil)} #{ENV.fetch('FASTLANE_REVIEW_LASTNAME', nil)}")
|
7
13
|
languages(%w[en-US de-DE])
|
14
|
+
precheck_default_rule_level(:error)
|
15
|
+
precheck_include_in_app_purchases(false)
|
16
|
+
username(ENV.fetch("FASTLANE_USER", nil))
|
data/templates/fastlane/Snapfile
CHANGED
@@ -28,7 +28,6 @@ languages([
|
|
28
28
|
# remove the '#' to clear all previously generated screenshots before creating new ones
|
29
29
|
clear_previous_screenshots(true)
|
30
30
|
|
31
|
-
# Remove the '#' to set the status bar to 9:41 AM, and show full battery and reception. See also override_status_bar_arguments for custom options.
|
32
31
|
override_status_bar(true)
|
33
32
|
localize_simulator(true)
|
34
33
|
# Arguments to pass to the app on launch. See https://docs.fastlane.tools/actions/snapshot/#launch-arguments
|
metadata
CHANGED
@@ -1,57 +1,77 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcode_fastlane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karsten Silkenbäumer
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: dotenv
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.1.1
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 3.0.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 2.1.1
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 3.0.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: git
|
15
35
|
requirement: !ruby/object:Gem::Requirement
|
16
36
|
requirements:
|
17
37
|
- - "~>"
|
18
38
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
39
|
+
version: '2.0'
|
20
40
|
type: :runtime
|
21
41
|
prerelease: false
|
22
42
|
version_requirements: !ruby/object:Gem::Requirement
|
23
43
|
requirements:
|
24
44
|
- - "~>"
|
25
45
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
46
|
+
version: '2.0'
|
27
47
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
48
|
+
name: thor
|
29
49
|
requirement: !ruby/object:Gem::Requirement
|
30
50
|
requirements:
|
31
51
|
- - "~>"
|
32
52
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
53
|
+
version: '1.3'
|
34
54
|
type: :runtime
|
35
55
|
prerelease: false
|
36
56
|
version_requirements: !ruby/object:Gem::Requirement
|
37
57
|
requirements:
|
38
58
|
- - "~>"
|
39
59
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
60
|
+
version: '1.3'
|
41
61
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
62
|
+
name: xcodeproj
|
43
63
|
requirement: !ruby/object:Gem::Requirement
|
44
64
|
requirements:
|
45
65
|
- - "~>"
|
46
66
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
67
|
+
version: '1.24'
|
48
68
|
type: :runtime
|
49
69
|
prerelease: false
|
50
70
|
version_requirements: !ruby/object:Gem::Requirement
|
51
71
|
requirements:
|
52
72
|
- - "~>"
|
53
73
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
74
|
+
version: '1.24'
|
55
75
|
description: Provides init script, templates and functions to be used within fastlane
|
56
76
|
files.
|
57
77
|
email:
|
@@ -78,6 +98,10 @@ files:
|
|
78
98
|
- templates/Gemfile
|
79
99
|
- templates/ci_scripts/ci_post_clone.sh
|
80
100
|
- templates/ci_scripts/ci_post_xcodebuild.sh
|
101
|
+
- templates/fastlane/.env.beta
|
102
|
+
- templates/fastlane/.env.ios
|
103
|
+
- templates/fastlane/.env.mac
|
104
|
+
- templates/fastlane/.env.release
|
81
105
|
- templates/fastlane/Appfile
|
82
106
|
- templates/fastlane/Deliverfile
|
83
107
|
- templates/fastlane/Fastfile
|
@@ -90,7 +114,7 @@ metadata:
|
|
90
114
|
source_code_uri: https://github.com/kassi/xcode_fastlane
|
91
115
|
changelog_uri: https://github.com/kassi/xcode_fastlane/CHANGELOG.md
|
92
116
|
rubygems_mfa_required: 'true'
|
93
|
-
post_install_message:
|
117
|
+
post_install_message:
|
94
118
|
rdoc_options: []
|
95
119
|
require_paths:
|
96
120
|
- lib
|
@@ -105,8 +129,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
129
|
- !ruby/object:Gem::Version
|
106
130
|
version: '0'
|
107
131
|
requirements: []
|
108
|
-
rubygems_version: 3.
|
109
|
-
signing_key:
|
132
|
+
rubygems_version: 3.4.10
|
133
|
+
signing_key:
|
110
134
|
specification_version: 4
|
111
135
|
summary: Easy fastlane setup for xcode projects using Xcode Cloud builds.
|
112
136
|
test_files: []
|