Skip to content

Commit cb53e4e

Browse files
authored
Hide all stdout outputs from the fastlane match step (flutter#14616)
1 parent 28bf8e7 commit cb53e4e

1 file changed

Lines changed: 21 additions & 7 deletions

File tree

  • examples/flutter_gallery/ios/fastlane

examples/flutter_gallery/ios/fastlane/Fastfile

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ skip_docs
33

44
default_platform(:ios)
55

6+
def suppress_output
7+
original_stdout, original_stderr = $stdout.clone, $stderr.clone
8+
$stderr.reopen File.new('/dev/null', 'w')
9+
$stdout.reopen File.new('/dev/null', 'w')
10+
yield
11+
ensure
12+
$stdout.reopen original_stdout
13+
$stderr.reopen original_stderr
14+
end
15+
616
# This should be run after running
717
# flutter build ios --release --no-codesign
818
# to build the app using the Flutter toolchain. This lane is meant to only
@@ -24,13 +34,17 @@ platform :ios do
2434
version_number: /\d+\.\d+\.\d+/.match(raw_version)[0]
2535
)
2636

27-
# Retrieves all the necessary certs and provisioning profiles.
28-
sync_code_signing(
29-
git_url: ENV['PUBLISHING_MATCH_CERTIFICATE_REPO'],
30-
type: 'appstore',
31-
readonly: true,
32-
verbose: false
33-
)
37+
puts 'Retrieving signing certificates and profiles...'
38+
# Stop fastlane from echoing back PUBLISHING_MATCH_CERTIFICATE_REPO var.
39+
suppress_output {
40+
# Retrieves all the necessary certs and provisioning profiles.
41+
sync_code_signing(
42+
git_url: ENV['PUBLISHING_MATCH_CERTIFICATE_REPO'],
43+
type: 'appstore',
44+
readonly: true
45+
)
46+
}
47+
puts 'Certificates and profiles installed'
3448

3549
# Modify the Xcode project to use the new team and profile.
3650
# It will put the git state to dirty but Travis will be wiped after

0 commit comments

Comments
 (0)