diff options
author | cyberta <cyberta@riseup.net> | 2023-01-23 19:47:56 +0100 |
---|---|---|
committer | cyberta <cyberta@riseup.net> | 2023-01-23 19:47:56 +0100 |
commit | 7d0a1f8d8057faa74035de0cee262a46c6fbbe00 (patch) | |
tree | beb7ae926be396c9faff6978677d74c466d3e20f /fastlane | |
parent | a800ef1e82c25207a842c197190b614e43739051 (diff) |
setup fastlane to create screenshots for Bitmask and custom branded clients, refactor Tests accordingly and create a script and environment variables to run fastlane screenshotting without thinking
Diffstat (limited to 'fastlane')
-rw-r--r-- | fastlane/.env.custom | 3 | ||||
-rw-r--r-- | fastlane/.env.default | 3 | ||||
-rw-r--r-- | fastlane/Fastfile | 46 | ||||
-rw-r--r-- | fastlane/README.md | 28 | ||||
-rw-r--r-- | fastlane/Screengrabfile | 4 |
5 files changed, 77 insertions, 7 deletions
diff --git a/fastlane/.env.custom b/fastlane/.env.custom new file mode 100644 index 00000000..9b65f5d4 --- /dev/null +++ b/fastlane/.env.custom @@ -0,0 +1,3 @@ +SCREENGRAB_APP_PACKAGE_NAME="se.leap.riseupvpn" +SCREENGRAB_APP_APK_PATH="app/build/outputs/apk/customProductionFat/debug/RiseupVPN_debug.apk" +SCREENGRAB_TESTS_APK_PATH="app/build/outputs/apk/androidTest/customProductionFat/debug/app-custom-production-fat-debug-androidTest.apk" diff --git a/fastlane/.env.default b/fastlane/.env.default new file mode 100644 index 00000000..bdb771ce --- /dev/null +++ b/fastlane/.env.default @@ -0,0 +1,3 @@ +SCREENGRAB_APP_PACKAGE_NAME="se.leap.bitmaskclient" +SCREENGRAB_APP_APK_PATH="app/build/outputs/apk/normalProductionFat/debug/Bitmask_debug.apk" +SCREENGRAB_TESTS_APK_PATH="app/build/outputs/apk/androidTest/normalProductionFat/debug/app-normal-production-fat-debug-androidTest.apk" diff --git a/fastlane/Fastfile b/fastlane/Fastfile index d985984d..a0e25930 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -21,12 +21,56 @@ platform :android do gradle(task: "test") end - lane :screenshots do + desc "Build debug and test APK for screenshots" + lane :build_bitmask_for_screengrab do + gradle( + task: 'clean' + ) + gradle( + task: 'assemble', + build_type: 'Debug', + flavor: 'NormalProductionFat' + ) + gradle( + task: 'assemble', + build_type: 'DebugAndroidTest', + flavor: 'NormalProductionFat' + ) + end + + desc "Build debug and test APK for screenshots" + lane :build_custom_for_screengrab do + gradle( + task: 'clean' + ) + gradle( + task: 'assemble', + build_type: 'Debug', + flavor: 'CustomProductionFat' + ) + gradle( + task: 'assemble', + build_type: 'DebugAndroidTest', + flavor: 'CustomProductionFat' + ) + end + + lane :bitmask_screenshots do + # Prepare builds for Automatic UI Tests + build_bitmask_for_screengrab capture_android_screenshots frameit(white: true) # deliver end + lane :custom_build_screenshots do + # Prepare builds for Automatic UI Tests + build_custom_for_screengrab + capture_android_screenshots + frameit(white: true) + # deliver + end + desc "Submit a new Beta Build to Crashlytics Beta" lane :beta do gradle(task: "clean assembleRelease") diff --git a/fastlane/README.md b/fastlane/README.md index 96002ac1..a41fc4c9 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -23,10 +23,34 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do Runs all the tests -### android screenshots +### android build_bitmask_for_screengrab ```sh -[bundle exec] fastlane android screenshots +[bundle exec] fastlane android build_bitmask_for_screengrab +``` + +Build debug and test APK for screenshots + +### android build_custom_for_screengrab + +```sh +[bundle exec] fastlane android build_custom_for_screengrab +``` + +Build debug and test APK for screenshots + +### android bitmask_screenshots + +```sh +[bundle exec] fastlane android bitmask_screenshots +``` + + + +### android custom_build_screenshots + +```sh +[bundle exec] fastlane android custom_build_screenshots ``` diff --git a/fastlane/Screengrabfile b/fastlane/Screengrabfile index 8a149163..8534db2a 100644 --- a/fastlane/Screengrabfile +++ b/fastlane/Screengrabfile @@ -1,11 +1,7 @@ # remove the leading '#' to uncomment lines -# app_package_name('your.app.package') use_tests_in_packages(['se.leap.bitmaskclient.suite']) -app_apk_path('app/build/intermediates/apk/normalProductionFat/debug/Bitmask_debug.apk') -tests_apk_path('app/build/intermediates/apk/androidTest/normalProductionFat/debug/app-normal-production-fat-debug-androidTest.apk') - # all locales # locales(['ar', 'az', 'bg', 'bn', 'br', 'ca', 'cs', 'de', 'el', 'es', 'es-AR', 'et', 'eu', 'fa-IR', 'fi', 'fr', 'gl', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'my', 'nl', 'no', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', 'tr', 'ug', 'uk', 'vi', 'zh-CN', 'zh-TW']) # prioritized locales |