@@ -91,7 +91,7 @@ platform :ios do
91
91
# ------------------------------------------------------------
92
92
# RUN PERIPHERY FOR DEAD CODE ANALYSIS
93
93
# ------------------------------------------------------------
94
- desc "RUN PERIPHERY FOR DEAD CODE ANALYSIS "
94
+ desc "Run Periphery to look dor dead code in the code base. Avoid strict mode because some false positive remains and command must be fine-tuned. "
95
95
lane :check_dead_code do
96
96
puts "👉 Check dead code with Periphery"
97
97
@@ -101,7 +101,7 @@ platform :ios do
101
101
# ------------------------------------------------------------
102
102
# RUN SWIFT FORMAT TO FORMAT SOURCES
103
103
# ------------------------------------------------------------
104
- desc "RUN SWIFT FORMAT TO FORMAT SOURCES "
104
+ desc "Run SwiftFormat to format Swift source files according to the local configuration. "
105
105
lane :format do
106
106
puts "👉 Run Swift Format to format sources"
107
107
@@ -112,7 +112,7 @@ platform :ios do
112
112
# ------------------------------------------------------------
113
113
# RUN SWIFT LINT TO CHECK SMELLS
114
114
# ------------------------------------------------------------
115
- desc "RUN SWIFT LINT TO CHECK SMELLS "
115
+ desc "Run SwiftLint in strict mode to detect code smells "
116
116
lane :lint do
117
117
puts "👉 Run Swift Lint for smells"
118
118
@@ -123,7 +123,7 @@ platform :ios do
123
123
# ------------------------------------------------------------
124
124
# RUN LICENSE-PLSIT FOR 3RD PARTIES UPDATES
125
125
# ------------------------------------------------------------
126
- desc "RUN LICENSEPLIST TO UPDATE LIST OF THIRD PARTIES "
126
+ desc "Run LicensePlist to update list of third-parties "
127
127
lane :update_3rd_parties do
128
128
puts "👉 Run LicensePlist to update list of third-parties"
129
129
@@ -141,14 +141,34 @@ platform :ios do
141
141
# ------------------------------------------------------------
142
142
# RUN GITLEAKS FOR SECET LEAKS SCAN
143
143
# ------------------------------------------------------------
144
- desc "RUN GITLEAKS FOR SECET LEAKS SCAN "
144
+ desc "Run GitLeaks to look for leaks of secrets in project and Git history "
145
145
lane :check_leaks do
146
146
puts "👉 Run Gitleaks for leaks scan"
147
147
148
148
# If there are violations, non 0 error be returned by swiftlint, making Fastlane fail (expected)
149
149
sh "cd .. && gitleaks detect -v -l debug --source ."
150
150
end
151
151
152
+ # ------------------------------------------------------------
153
+ # RUN SYFT AND GRYPE TO BUILD AND ANALYSE SBOM
154
+ # ------------------------------------------------------------
155
+ desc "Generates a SBOM (Software Bill Of Materials) in CycloneDX format with Syft and analsye it with Grype to as to check for vulnerabilities"
156
+ lane :update_sbom do
157
+ puts "👉 Run Syft to generate the SBOM"
158
+
159
+ sbomFormat = "cyclonedx-json"
160
+ # In { negligible, low, medium, high, critical }
161
+ vulnerabilitiesTolerance = "negligible"
162
+
163
+ Dir . chdir "../.." do
164
+ # Run the command to generate SBOM
165
+ sh "syft . -o #{ sbomFormat } > SBOM.json"
166
+
167
+ # Process the SBOM
168
+ sh "grype sbom:./SBOM.json --fail-on #{ vulnerabilitiesTolerance } "
169
+ end
170
+ end
171
+
152
172
# ------------------------------------------------------------
153
173
# UPDATE BUILD NUMBER WITH TIMESTAMP
154
174
# ------------------------------------------------------------
@@ -168,7 +188,7 @@ platform :ios do
168
188
# -------------------
169
189
# RUN SNAPSHOTS TESTS
170
190
# -------------------
171
- desc "RUN SNAPSHOTS TESTS BY TRIGGERING THE TESTS PLANS OF THE PROJECT "
191
+ desc "Run snapshots tests in the demo app to look for visual regressions of components defined in OUDS package "
172
192
lane :test_snapshots do
173
193
puts "👉 Run UI tests"
174
194
@@ -199,7 +219,7 @@ platform :ios do
199
219
# ------------
200
220
# RUN UI TESTS
201
221
# ------------
202
- desc "RUN UI TESTS BY TRIGGERING THE TESTS PLANS OF THE PROJECT "
222
+ desc "Run UI tests in the demo app to check some specific components behaviors "
203
223
lane :test_ui do
204
224
puts "👉 Run UI tests"
205
225
@@ -230,7 +250,7 @@ platform :ios do
230
250
# ------------------------------------------------------------
231
251
# BUILD DEBUG APP
232
252
# ------------------------------------------------------------
233
- desc "BUILD DEBUG APP "
253
+ desc "Build locally the demo app in debug mode without upload "
234
254
lane :buildDebugApp do
235
255
puts "👉 Build debug app"
236
256
@@ -258,7 +278,7 @@ platform :ios do
258
278
# ------------------------------------------------------------
259
279
# BUILD & UPLOAD TO TESTFLIGHT ALPHA APP
260
280
# ------------------------------------------------------------
261
- desc "BUILD & UPLOAD TO TESTFLIGHT ALPHA APP "
281
+ desc "Build the demo app in alpha mode and upload to TestFlight "
262
282
lane :alpha do |params |
263
283
issues_numbers = params [ :issueNumber ]
264
284
puts "👉 Alpha (commit hash = '#{ params [ :commitHash ] } ', issue number = '#{ issues_numbers } ')"
@@ -298,7 +318,7 @@ platform :ios do
298
318
# ------------------------------------------------------------
299
319
# BUILD & UPLOAD TO TESTFLIGHT BETA APP
300
320
# ------------------------------------------------------------
301
- desc "BUILD & UPLOAD TO TESTFLIGHT BETA APP "
321
+ desc "Build the demo app in neta mode and upload to TestFlight "
302
322
lane :beta do |params |
303
323
puts "👉 Beta (commit hash = '#{ params [ :commitHash ] } ')"
304
324
Dir . chdir "../#{ OUDS_PROJECT_NAME } /Resources/Assets.xcassets" do
@@ -335,7 +355,7 @@ platform :ios do
335
355
# ------------------------------------------------------------
336
356
# BUILD & UPLOAD TO STORE STABLE APP
337
357
# ------------------------------------------------------------
338
- desc "BUILD & UPLOAD TO STORE (if set in options: upload) STABLE APP "
358
+ desc "Build the demo app in stable mode and, if defined, upload to internal portal for App Store publication "
339
359
lane :stable do |params |
340
360
puts "👉 Stable"
341
361
@@ -376,6 +396,7 @@ platform :ios do
376
396
# -----------------------------------------------------------------------
377
397
# PRIVATE LANE BUILD & UPLOAD (ALPHA / BETA is set by main lane)
378
398
# -----------------------------------------------------------------------
399
+ desc "Build the demo app in a defined mode and upload if needed to TestFlight or internal portal for App Store publication"
379
400
private_lane :build_and_upload do |params |
380
401
isAlpha = params [ :isAlpha ]
381
402
@@ -420,7 +441,7 @@ platform :ios do
420
441
# -----------------------------------------------------------------------
421
442
# PRIVATE LANE BUILD (ALPHA / BETA / STABLE is set by main lane)
422
443
# -----------------------------------------------------------------------
423
- desc "PRIVATE LANE BUILD (ALPHA / BETA / STABLE is set by main lane) "
444
+ desc "Build the demo app "
424
445
private_lane :build do
425
446
puts "👉 Build"
426
447
@@ -472,7 +493,7 @@ platform :ios do
472
493
# --------------------------------------------------------------------------
473
494
# PRIVATE LANE UPLOAD TO TESTFLIGHT (ALPHA / BETA is set by main lane)
474
495
# ---------------------------------------------------------------------------
475
- desc "PRIVATE LANE UPLOAD TO TESTFLIGHT "
496
+ desc "Upload the demo app to TestFlight "
476
497
private_lane :upload_2_testflight do |params |
477
498
puts "👉 Upload"
478
499
@@ -525,7 +546,7 @@ platform :ios do
525
546
# ----------------------------
526
547
# PRIVATE LANE UPLOAD TO STORE
527
548
# ----------------------------
528
- desc "PRIVATE LANE UPLOAD TO STORE "
549
+ desc "Upload the demo app to the internal portal for the App Store publication "
529
550
private_lane :upload_2_store do |params |
530
551
puts "👉 Upload to store"
531
552
0 commit comments