From 07f446b2049e24b8859fdc8d4d8b43453cb97889 Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Fri, 17 May 2024 12:57:58 -0700 Subject: [PATCH] Update the `adhoc` lane to generate an alpha build (#2851) Task/Issue URL: https://app.asana.com/0/414235014887631/1207309089780665/f Tech Design URL: CC: Description: This PR changes the adhoc workflow to create an alpha build. Until now it has created builds with the release bundle ID, which complicates testing for those who use the DDG app already. --- fastlane/Fastfile | 19 +++++++++++-------- fastlane/Matchfile | 2 ++ fastlane/README.md | 12 ++++++++++-- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 2eb3de8abb..f18657fd83 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -28,8 +28,13 @@ lane :sync_signing_alpha_adhoc do |options| do_sync_signing(options) end -desc 'Makes Ad-Hoc build with a specified name in a given directory' +desc 'Makes Ad-Hoc build with a specified name and alpha bundle ID in a given directory' lane :adhoc do |options| + alpha_adhoc(options) +end + +desc 'Makes Ad-Hoc build with a specified name and release bundle ID in a given directory' +lane :release_adhoc do |options| # Workaround for match + gym failing at build phase https://forums.swift.org/t/xcode-14-beta-code-signing-issues-when-spm-targets-include-resources/59685/32 if is_ci @@ -75,7 +80,7 @@ lane :adhoc do |options| timestamp = Time.now.strftime("%Y-%m-%d-%H-%M") output_name = "DuckDuckGo-#{suffix}#{timestamp}" - + build_app( output_directory: options[:output], output_name: output_name, @@ -95,7 +100,7 @@ lane :adhoc do |options| end end -desc 'Makes Ad-Hoc build for alpha with a specified name in a given directory' +desc 'Makes Ad-Hoc build for alpha with a specified name and alpha bundle ID in a given directory' lane :alpha_adhoc do |options| # Workaround for match + gym failing at build phase https://forums.swift.org/t/xcode-14-beta-code-signing-issues-when-spm-targets-include-resources/59685/32 @@ -126,14 +131,13 @@ lane :alpha_adhoc do |options| configurations.each do |config| update_code_signing_settings( use_automatic_signing: false, - build_configurations: ["Release"], + build_configurations: ["Alpha"], code_sign_identity: "iPhone Distribution", **config ) end end - sync_signing_alpha(options) sync_signing_alpha_adhoc(options) suffix = "" @@ -143,7 +147,6 @@ lane :alpha_adhoc do |options| timestamp = Time.now.strftime("%Y-%m-%d-%H-%M") output_name = "DuckDuckGo-Alpha-#{suffix}#{timestamp}" - build_app( output_directory: options[:output], @@ -236,11 +239,11 @@ lane :increment_build_number_for_version do |options| app_identifier = options[:app_identifier] end increment_build_number({ - build_number: + build_number: latest_testflight_build_number( api_key: get_api_key, version: options[:version], - app_identifier: app_identifier, + app_identifier: app_identifier, initial_build_number: -1, username: get_username(options)) + 1, skip_info_plist: "true" diff --git a/fastlane/Matchfile b/fastlane/Matchfile index f06e49d057..eb39fd637c 100644 --- a/fastlane/Matchfile +++ b/fastlane/Matchfile @@ -21,7 +21,9 @@ end for_lane :adhoc do type "adhoc" + app_identifier ["com.duckduckgo.mobile.ios.alpha", "com.duckduckgo.mobile.ios.alpha.ShareExtension", "com.duckduckgo.mobile.ios.alpha.OpenAction2", "com.duckduckgo.mobile.ios.alpha.Widgets", "com.duckduckgo.mobile.ios.alpha.NetworkExtension"] force_for_new_devices true + template_name "Default Web Browser iOS (Dist)" end for_lane :alpha_adhoc do diff --git a/fastlane/README.md b/fastlane/README.md index 36598490d2..195f7f9607 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -51,7 +51,15 @@ Fetches and updates certificates and provisioning profiles for Ad-Hoc distributi [bundle exec] fastlane adhoc ``` -Makes Ad-Hoc build with a specified name in a given directory +Makes Ad-Hoc build with a specified name and alpha bundle ID in a given directory + +### release_adhoc + +```sh +[bundle exec] fastlane release_adhoc +``` + +Makes Ad-Hoc build with a specified name and release bundle ID in a given directory ### alpha_adhoc @@ -59,7 +67,7 @@ Makes Ad-Hoc build with a specified name in a given directory [bundle exec] fastlane alpha_adhoc ``` -Makes Ad-Hoc build for alpha with a specified name in a given directory +Makes Ad-Hoc build for alpha with a specified name and alpha bundle ID in a given directory ### release_appstore