@@ -295,7 +295,7 @@ platform :android do |options|
295
295
desc "Deploy new lite version"
296
296
private_lane :deployLite do |options |
297
297
sh ( "docker build -t cryptomator-android ../buildsystem" )
298
- sh ( "docker run --rm -u $(id -u):$(id -g) - v $(cd .. && pwd):/project -w /project cryptomator-android ./gradlew clean assembleLiteRelease" )
298
+ sh ( "docker run --rm -v $(cd .. && pwd):/project -w /project cryptomator-android ./gradlew clean assembleLiteRelease" )
299
299
300
300
sh ( "zipalign -v -p 4 ../presentation/build/outputs/apk/lite/release/presentation-lite-release-unsigned.apk presentation-lite-release-unsigned-aligned.apk" )
301
301
sh ( "apksigner sign --ks #{ ENV [ "SIGNING_KEYSTORE_PATH" ] } --ks-key-alias #{ ENV [ "SIGNING_KEY_ALIAS" ] } --ks-pass env:SIGNING_KEYSTORE_PASSWORD --key-pass env:SIGNING_KEY_PASSWORD --out release/Cryptomator-#{ version } _lite_signed.apk presentation-lite-release-unsigned-aligned.apk" )
@@ -366,20 +366,23 @@ platform :android do |options|
366
366
367
367
desc "Run fluidattacks"
368
368
lane :runFluidattacks do |options |
369
- # if you want to run it for a specific version just set e.g. version = "1.10.0"
370
- fluidattacks_apks_path = "fluidattacks/apks"
371
- apk_types = %w[ signed fdroid_signed lite_signed playstore_signed ]
372
-
373
- FileUtils . mkdir ( "#{ fluidattacks_apks_path } " )
374
- apk_types . each do |type |
375
- FileUtils . mkdir ( "#{ fluidattacks_apks_path } /Cryptomator-#{ version } _#{ type } /" )
376
- FileUtils . cp ( "release/Cryptomator-#{ version } _#{ type } .apk" , "#{ fluidattacks_apks_path } /Cryptomator-#{ version } _#{ type } /" )
369
+ if !options [ :verifyOnly ]
370
+ fluidattacks_apks_path = "fluidattacks/apks"
371
+ apk_types = %w[ signed fdroid_signed lite_signed playstore_signed ]
372
+
373
+ FileUtils . mkdir ( "#{ fluidattacks_apks_path } " )
374
+ apk_types . each do |type |
375
+ FileUtils . mkdir ( "#{ fluidattacks_apks_path } /Cryptomator-#{ version } _#{ type } /" )
376
+ FileUtils . cp ( "release/Cryptomator-#{ version } _#{ type } .apk" , "#{ fluidattacks_apks_path } /Cryptomator-#{ version } _#{ type } /" )
377
+ end
377
378
end
378
379
379
380
puts "Run Fluidattacks. Results are in /src/fastlane/fluidattacks/results.csv"
380
381
sh ( "docker run -v $(cd .. && pwd):/src -w /src fluidattacks/cli:amd64 skims scan /src/fastlane/fluidattacks/config.yaml" )
381
382
382
- FileUtils . rm_r ( "#{ fluidattacks_apks_path } " )
383
+ if !options [ :verifyOnly ]
384
+ FileUtils . rm_r ( "#{ fluidattacks_apks_path } " )
385
+ end
383
386
end
384
387
385
388
desc "Create GitHub draft release"
@@ -419,6 +422,14 @@ platform :android do |options|
419
422
420
423
checkVersionCodeSet ( alpha :options [ :alpha ] , beta :options [ :beta ] )
421
424
425
+ fluidattacks_apks_path = "fluidattacks/apks"
426
+ apk_types = %w[ signed fdroid_signed lite_signed playstore_signed ]
427
+
428
+ FileUtils . mkdir ( "#{ fluidattacks_apks_path } " )
429
+ apk_types . each do |type |
430
+ FileUtils . mkdir ( "#{ fluidattacks_apks_path } /Cryptomator-#{ version } _#{ type } /" )
431
+ end
432
+
422
433
gradle ( task : "clean" )
423
434
424
435
gradle (
@@ -437,6 +448,8 @@ platform :android do |options|
437
448
checkTrackingAddedInDependencyUsingIzzyScript ( alpha :options [ :alpha ] , beta :options [ :beta ] , flavor : 'playstore' )
438
449
checkTrackingAddedInDependencyUsingExodus ( alpha :options [ :alpha ] , beta :options [ :beta ] , flavor : 'playstore' )
439
450
451
+ FileUtils . cp ( lane_context [ SharedValues ::GRADLE_APK_OUTPUT_PATH ] , "#{ fluidattacks_apks_path } /Cryptomator-#{ version } _playstore_signed/Cryptomator-#{ version } _playstore_signed.apk" )
452
+
440
453
gradle ( task : "clean" )
441
454
442
455
gradle (
@@ -455,6 +468,8 @@ platform :android do |options|
455
468
checkTrackingAddedInDependencyUsingIzzyScript ( alpha :options [ :alpha ] , beta :options [ :beta ] , flavor : 'apkstore' )
456
469
checkTrackingAddedInDependencyUsingExodus ( alpha :options [ :alpha ] , beta :options [ :beta ] , flavor : 'apkstore' )
457
470
471
+ FileUtils . cp ( lane_context [ SharedValues ::GRADLE_APK_OUTPUT_PATH ] , "#{ fluidattacks_apks_path } /Cryptomator-#{ version } _signed/Cryptomator-#{ version } _signed.apk" )
472
+
458
473
gradle ( task : "clean" )
459
474
460
475
gradle (
@@ -473,6 +488,8 @@ platform :android do |options|
473
488
checkTrackingAddedInDependencyUsingIzzyScript ( alpha :options [ :alpha ] , beta :options [ :beta ] , flavor : 'fdroid' )
474
489
checkTrackingAddedInDependencyUsingExodus ( alpha :options [ :alpha ] , beta :options [ :beta ] , flavor : 'fdroid' )
475
490
491
+ FileUtils . cp ( lane_context [ SharedValues ::GRADLE_APK_OUTPUT_PATH ] , "#{ fluidattacks_apks_path } /Cryptomator-#{ version } _fdroid_signed/Cryptomator-#{ version } _fdroid_signed.apk" )
492
+
476
493
gradle ( task : "clean" )
477
494
478
495
gradle (
@@ -490,5 +507,11 @@ platform :android do |options|
490
507
491
508
checkTrackingAddedInDependencyUsingIzzyScript ( alpha :options [ :alpha ] , beta :options [ :beta ] , flavor : 'lite' )
492
509
checkTrackingAddedInDependencyUsingExodus ( alpha :options [ :alpha ] , beta :options [ :beta ] , flavor : 'lite' )
510
+
511
+ FileUtils . cp ( lane_context [ SharedValues ::GRADLE_APK_OUTPUT_PATH ] , "#{ fluidattacks_apks_path } /Cryptomator-#{ version } _lite_signed/Cryptomator-#{ version } _lite_signed.apk" )
512
+
513
+ runFluidattacks ( verifyOnly :true )
514
+
515
+ FileUtils . rm_r ( "#{ fluidattacks_apks_path } " )
493
516
end
494
517
end
0 commit comments