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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc2bdae8df94b0ec1d5737ab0fc0a942ff03203dedd277c185b5d3fb8ccfe04c
4
- data.tar.gz: 2a47d93c0f454c7c1b0fa3252b469577ddbbe9ef4bfcc90c93b96c9a9405c496
3
+ metadata.gz: 3ec5914ef095a9a6fa672f369746a8b52fc01218a9ceb50e201783fc4bf6d50f
4
+ data.tar.gz: 2e65ff5de1bcf5d9fa25d1fe9962baf69a2c8f1cfeb94bd522b8fcc0a2d90524
5
5
  SHA512:
6
- metadata.gz: 305bc42811f91a1857ffcf3730d8a120990a304b52aeebce623357339adb3af815bd1fc09a6aed584fc0890303464af2a1d1a7a71f43bc378688f300dddbc2fe
7
- data.tar.gz: 77fbb984e323fb95c7c11c812eb4ecaba4cb8d3dc172612e8955e5bc2b187f892adb157251c107a58fa163761e71a09ad607cfb3da54577ec33a054d979e3804
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
- TargetRubyVersion: 3
8
- Exclude:
9
- - fastlane/**/*
10
- - templates/**/*
11
-
12
- Capybara:
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
- Lint/RedundantRegexpQuantifiers:
106
- Enabled: true
13
+ Bundler/OrderedGems:
14
+ TreatCommentsAsGroupSeparators: false
107
15
 
108
- Lint/RefinementImportMethods:
109
- Enabled: true
16
+ Layout/IndentationStyle:
17
+ IndentationWidth: 2
110
18
 
111
- Lint/RequireRangeParentheses:
112
- Enabled: true
19
+ Layout/LineLength:
20
+ Max: 140
113
21
 
114
- Lint/RequireRelativeSelfPath:
115
- Enabled: true
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
- RSpec/ReceiveMessages:
196
- Enabled: true
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
- RSpec/RedundantAround:
199
- Enabled: true
46
+ Metrics/PerceivedComplexity:
47
+ Max: 10
200
48
 
201
- RSpec/RedundantPredicateMatcher:
202
- Enabled: true
49
+ Naming/FileName:
50
+ Exclude:
51
+ - Guardfile
203
52
 
204
- RSpec/RemoveConst:
205
- Enabled: true
53
+ Naming/PredicateName:
54
+ Enabled: false
206
55
 
207
- RSpec/RepeatedSubjectCall:
208
- Enabled: true
56
+ RSpec/ContextWording:
57
+ Prefixes:
58
+ - and
59
+ - as
60
+ - for
61
+ - when
62
+ - with
63
+ - without
209
64
 
210
- RSpec/SkipBlockInsideExample:
211
- Enabled: true
65
+ RSpec/ExampleLength:
66
+ Max: 13
212
67
 
213
- RSpec/SortMetadata:
214
- Enabled: true
68
+ RSpec/FilePath:
69
+ Enabled: false
215
70
 
216
71
  RSpec/SpecFilePathFormat:
217
- Enabled: true
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
- Style/RedundantHeredocDelimiterQuotes:
385
- Enabled: true
74
+ RSpec/MultipleExpectations:
75
+ Max: 7
386
76
 
387
- Style/RedundantInitialize:
388
- Enabled: true
77
+ RSpec/MultipleMemoizedHelpers:
78
+ Max: 6
389
79
 
390
- Style/RedundantLineContinuation:
391
- Enabled: true
80
+ RSpec/NamedSubject:
81
+ Enabled: false
392
82
 
393
- Style/RedundantRegexpArgument:
394
- Enabled: true
83
+ RSpec/NestedGroups:
84
+ Max: 5
395
85
 
396
- Style/RedundantRegexpConstructor:
397
- Enabled: true
86
+ RSpec/VerifiedDoubles:
87
+ Enabled: false
398
88
 
399
- Style/RedundantSelfAssignmentBranch:
400
- Enabled: true
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/RedundantStringEscape:
403
- Enabled: true
104
+ Style/Documentation:
105
+ Enabled: false
404
106
 
405
- Style/ReturnNilInPredicateMethodDefinition:
406
- Enabled: true
107
+ Style/EmptyMethod:
108
+ EnforcedStyle: expanded
407
109
 
408
- Style/SelectByRegexp:
409
- Enabled: true
110
+ Style/FormatString:
111
+ EnforcedStyle: format
410
112
 
411
- Style/SingleLineDoEndBlock:
412
- Enabled: true
113
+ Style/MethodCallWithArgsParentheses:
114
+ AllowedMethods:
115
+ - desc
413
116
 
414
- Style/StringChars:
415
- Enabled: true
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
@@ -1,3 +1,15 @@
1
+ ## 1.2.1 (2024-05-21)
2
+
3
+ ### Bug fixes
4
+
5
+ - rename mac platform
6
+
7
+ ## 1.2.0 (2024-05-21)
8
+
9
+ ### Features
10
+
11
+ - new fastfile with proper lane setup
12
+
1
13
  ## 1.1.0 (2024-05-17)
2
14
 
3
15
  ### Features
data/fastlane/Fastfile CHANGED
@@ -6,56 +6,149 @@ opt_out_usage
6
6
  default_platform(:ios)
7
7
 
8
8
  platform :ios do
9
- # https://www.runway.team/blog/how-to-set-up-a-ci-cd-pipeline-for-your-ios-app-fastlane-github-actions
10
- desc "Load AppStore Connect API Key information to use in subsequent lanes"
11
- lane :load_api_key do
12
- app_store_connect_api_key(
13
- key_id: ENV.fetch("APPSTORE_CONNECT_API_KEY_ID", nil),
14
- issuer_id: ENV.fetch("APPSTORE_CONNECT_API_KEY_ISSUER_ID", nil),
15
- key_content: ENV.fetch("APPSTORE_CONNECT_API_KEY_P8", nil),
16
- is_key_content_base64: true,
17
- in_house: false # detecting this via AppStore Connect private key not currently supported
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 "Register app on Apple Developer Portal and AppStore Connect"
22
- lane :register do
23
- create_app_online( # produce
24
- language: "en-US",
25
- # com.example.AppName => com.example.apps.AppName.ios
26
- sku: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
27
- .split(".").insert(2, "apps").append("ios").join("."),
28
- enable_services: {}
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 "Generate and upload new localized screenshots and metadata"
33
- desc "Params: send_success: boolean, indicating whether to send a success message via slack"
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
- load_api_key
37
- register
38
- upload_to_app_store( # deliver
39
- skip_binary_upload: true,
40
- skip_screenshots: false,
41
- skip_metadata: false,
42
- skip_app_version_update: false,
43
- overwrite_screenshots: true,
44
- force: true,
45
- # Precheck cannot check In-app purchases with the App Store Connect API Key (yet).
46
- precheck_include_in_app_purchases: false,
47
- app_review_information: {
48
- first_name: ENV.fetch("FASTLANE_REVIEW_FIRSTNAME", nil),
49
- last_name: ENV.fetch("FASTLANE_REVIEW_LASTNAME", nil),
50
- phone_number: ENV.fetch("FASTLANE_REVIEW_PHONE", nil),
51
- email_address: ENV.fetch("FASTLANE_REVIEW_EMAIL", nil)
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("Data uploaded to AppStore Connect") if options[:send_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
@@ -13,12 +13,21 @@ module XcodeFastlane
13
13
 
14
14
  desc "init", "Initialize fastlane setup"
15
15
  def init
16
- copy_file ".gitignore"
17
- copy_file "Gemfile"
18
- copy_file "fastlane/Appfile"
19
- copy_file "fastlane/Deliverfile"
20
- copy_file "fastlane/Fastfile"
21
- copy_file "fastlane/Snapfile"
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module XcodeFastlane
4
- VERSION = "1.1.0"
4
+ VERSION = "1.2.1"
5
5
  end
@@ -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
@@ -0,0 +1,5 @@
1
+ PRODUCE_LANGUAGE = en-US
2
+ PRODUCE_PLATFORM = ios
3
+ PRODUCE_SKU = ${APP_IDENTIFIER}.ios
4
+ MATCH_PLATFORM = ios
5
+ DELIVER_PLATFORM = ios
@@ -0,0 +1,5 @@
1
+ PRODUCE_LANGUAGE = en-US
2
+ PRODUCE_PLATFORM = macos
3
+ PRODUCE_SKU = ${APP_IDENTIFIER}.macos
4
+ MATCH_PLATFORM = macos
5
+ DELIVER_PLATFORM = osx
File without changes
@@ -1,14 +1,16 @@
1
1
  require "xcode_fastlane"
2
2
 
3
3
  mandatory_environment = %w[
4
- APPSTORE_CONNECT_API_KEY_ID
5
- APPSTORE_CONNECT_API_KEY_ISSUER_ID
6
- APPSTORE_CONNECT_API_KEY_P8
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
- app_identifier(ENV["CI_BUNDLE_ID"] || XcodeFastlane.product_bundle_id)
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
- username(ENV.fetch("FASTLANE_USER", nil))
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))
@@ -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.0
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-17 00:00:00.000000000 Z
11
+ date: 2024-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: thor
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: '1.3'
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: '1.3'
46
+ version: '2.0'
27
47
  - !ruby/object:Gem::Dependency
28
- name: xcodeproj
48
+ name: thor
29
49
  requirement: !ruby/object:Gem::Requirement
30
50
  requirements:
31
51
  - - "~>"
32
52
  - !ruby/object:Gem::Version
33
- version: '1.24'
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.24'
60
+ version: '1.3'
41
61
  - !ruby/object:Gem::Dependency
42
- name: git
62
+ name: xcodeproj
43
63
  requirement: !ruby/object:Gem::Requirement
44
64
  requirements:
45
65
  - - "~>"
46
66
  - !ruby/object:Gem::Version
47
- version: '2.0'
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: '2.0'
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.5.10
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: []