Skip to content

Commit

Permalink
Update the adhoc lane to generate an alpha build (#2851)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
samsymons authored May 17, 2024
1 parent e02bbcf commit 07f446b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
19 changes: 11 additions & 8 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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 = ""
Expand All @@ -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],
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions fastlane/Matchfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 10 additions & 2 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,23 @@ 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

```sh
[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

Expand Down

0 comments on commit 07f446b

Please sign in to comment.