fastlane 2.28.9 → 2.29.0.beta.20170421010107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/deliver/lib/assets/summary.html.erb +0 -3
- data/deliver/lib/deliver/options.rb +2 -2
- data/deliver/lib/deliver/upload_metadata.rb +1 -2
- data/fastlane/README.md +2 -6
- data/fastlane/lib/fastlane/actions/artifactory.rb +1 -17
- data/fastlane/lib/fastlane/actions/crashlytics.rb +1 -1
- data/fastlane/lib/fastlane/actions/download_dsyms.rb +1 -1
- data/fastlane/lib/fastlane/actions/ensure_git_status_clean.rb +3 -17
- data/fastlane/lib/fastlane/actions/hockey.rb +1 -1
- data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +3 -3
- data/fastlane/lib/fastlane/plugins/template/.rubocop.yml +10 -16
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane_core/lib/fastlane_core/build_watcher.rb +21 -39
- data/fastlane_core/lib/fastlane_core/helper.rb +5 -7
- data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +1 -4
- data/fastlane_core/lib/fastlane_core/print_table.rb +9 -4
- data/fastlane_core/lib/fastlane_core/project.rb +4 -16
- data/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb +7 -11
- data/fastlane_core/lib/fastlane_core/ui/github_issue_inspector_reporter.rb +2 -2
- data/fastlane_core/lib/fastlane_core/ui/implementations/shell.rb +0 -2
- data/fastlane_core/lib/fastlane_core/ui/ui.rb +2 -0
- data/gym/lib/gym/generators/build_command_generator.rb +0 -2
- data/gym/lib/gym/options.rb +0 -10
- data/gym/lib/gym/runner.rb +0 -2
- data/gym/lib/gym/xcode.rb +3 -1
- data/pilot/lib/pilot/build_manager.rb +17 -44
- data/pilot/lib/pilot/commands_generator.rb +1 -2
- data/pilot/lib/pilot/options.rb +2 -3
- data/pilot/lib/pilot/tester_manager.rb +44 -58
- data/snapshot/lib/assets/SnapshotHelper.swift +1 -1
- data/spaceship/lib/spaceship/spaceauth_runner.rb +1 -1
- data/spaceship/lib/spaceship/test_flight.rb +0 -2
- data/spaceship/lib/spaceship/test_flight/base.rb +0 -12
- data/spaceship/lib/spaceship/test_flight/build.rb +8 -22
- data/spaceship/lib/spaceship/test_flight/client.rb +40 -121
- data/spaceship/lib/spaceship/test_flight/group.rb +7 -49
- data/spaceship/lib/spaceship/test_flight/test_info.rb +0 -4
- data/spaceship/lib/spaceship/tunes/app_ratings.rb +2 -74
- data/spaceship/lib/spaceship/tunes/app_status.rb +2 -4
- data/spaceship/lib/spaceship/tunes/application.rb +1 -1
- data/spaceship/lib/spaceship/tunes/iap_detail.rb +11 -48
- data/spaceship/lib/spaceship/tunes/iap_family_details.rb +5 -24
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +3 -14
- data/supply/lib/supply/setup.rb +2 -2
- metadata +16 -33
- data/spaceship/lib/spaceship/test_flight/app_test_info.rb +0 -27
- data/spaceship/lib/spaceship/test_flight/tester.rb +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85014dfb38ec08df2e882b67dab2873104d1f82c
|
4
|
+
data.tar.gz: 64afaa9217e93f86628361b8725f164e8dffcf69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d03cc1e1d52bb69d4ed64e05a28bd5917c888c419825e382e72d90df0ccb19ede70fe3e9bc43f416bdcbabe196ebfac64290a5be9c4236da0dfe8cf854868a8
|
7
|
+
data.tar.gz: e625dec851c79be6c9821c4a7c799b73daf3d7cdd7f9687298ca84c31cac38d25691dc817da05cc3a1fd3f9eadc242586b761fd64a4cc24c3d7807a263798d7f
|
data/README.md
CHANGED
@@ -48,7 +48,7 @@ Then to deploy a new 'beta' version of your app just run
|
|
48
48
|
:ghost: | [Jenkins Integration](https://docs.fastlane.tools/best-practices/continuous-integration/#jenkins-integration): Show output directly in test results
|
49
49
|
:book: | Automatically generate Markdown documentation of your lane configurations
|
50
50
|
:hatching_chick: | Over 170 built-in integrations available
|
51
|
-
:computer: | Support for iOS and Android apps
|
51
|
+
:computer: | Support for iOS, macOS, and Android apps
|
52
52
|
:octocat: | Full Git and Mercurial support
|
53
53
|
|
54
54
|
<hr />
|
@@ -37,7 +37,7 @@ module Deliver
|
|
37
37
|
optional: true,
|
38
38
|
env_name: "DELIVER_IPA_PATH",
|
39
39
|
description: "Path to your ipa file",
|
40
|
-
default_value: Dir["*.ipa"].
|
40
|
+
default_value: Dir["*.ipa"].first,
|
41
41
|
verify_block: proc do |value|
|
42
42
|
UI.user_error!("Could not find ipa file at path '#{File.expand_path(value)}'") unless File.exist?(value)
|
43
43
|
UI.user_error!("'#{value}' doesn't seem to be an ipa file") unless value.end_with?(".ipa")
|
@@ -51,7 +51,7 @@ module Deliver
|
|
51
51
|
optional: true,
|
52
52
|
env_name: "DELIVER_PKG_PATH",
|
53
53
|
description: "Path to your pkg file",
|
54
|
-
default_value: Dir["*.pkg"].
|
54
|
+
default_value: Dir["*.pkg"].first,
|
55
55
|
verify_block: proc do |value|
|
56
56
|
UI.user_error!("Could not find pkg file at path '#{File.expand_path(value)}'") unless File.exist?(value)
|
57
57
|
UI.user_error!("'#{value}' doesn't seem to be a pkg file") unless value.end_with?(".pkg")
|
@@ -116,7 +116,7 @@ module Deliver
|
|
116
116
|
end
|
117
117
|
|
118
118
|
# Check folder list (an empty folder signifies a language is required)
|
119
|
-
|
119
|
+
Dir.glob(File.join(options[:metadata_path], "*")).each do |lng_folder|
|
120
120
|
next unless File.directory?(lng_folder) # We don't want to read txt as they are non localised
|
121
121
|
|
122
122
|
language = File.basename(lng_folder)
|
@@ -233,7 +233,6 @@ module Deliver
|
|
233
233
|
UI.error(ex.to_s)
|
234
234
|
UI.user_error!("Error parsing JSON file at path '#{options[:app_rating_config_path]}'")
|
235
235
|
end
|
236
|
-
UI.message("Setting the app's age rating...")
|
237
236
|
v.update_rating(json)
|
238
237
|
end
|
239
238
|
end
|
data/fastlane/README.md
CHANGED
@@ -91,7 +91,7 @@ fastlane release
|
|
91
91
|
:ghost: | [Jenkins Integration](https://docs.fastlane.tools/best-practices/continuous-integration/#jenkins-integration): Show the output directly in the Jenkins test results
|
92
92
|
:book: | Automatically generate a markdown documentation of your lane config
|
93
93
|
:hatching_chick: | Over 170 built-in integrations available
|
94
|
-
:computer: | Support for iOS and Android apps
|
94
|
+
:computer: | Support for iOS, macOS and Android apps
|
95
95
|
:octocat: | Full git and mercurial support
|
96
96
|
|
97
97
|
|
@@ -138,11 +138,7 @@ The setup assistant will create all the necessary files for you, using the exist
|
|
138
138
|
- Follow the setup assistant, which will set up ```fastlane``` for you
|
139
139
|
- Further customise the ```Fastfile``` with [actions](https://docs.fastlane.tools/actions).
|
140
140
|
|
141
|
-
For more details, follow
|
142
|
-
|
143
|
-
- [Getting Started fastlane guide for iOS](https://docs.fastlane.tools/getting-started/ios/setup/)
|
144
|
-
- [Getting Started fastlane guide for Android](https://docs.fastlane.tools/getting-started/android/setup/)
|
145
|
-
|
141
|
+
For more details, please follow the [fastlane guide](https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Guide.md) or [documentation](https://github.com/fastlane/fastlane/tree/master/fastlane/docs).
|
146
142
|
|
147
143
|
There are also 2 Japanese fastlane guides available: [qiita](http://qiita.com/gin0606/items/a8573b582752de0c15e1) and [mercari](http://tech.mercari.com/entry/2015/07/13/143000)
|
148
144
|
|
@@ -1,10 +1,5 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
|
-
module SharedValues
|
4
|
-
ARTIFACTORY_DOWNLOAD_URL = :ARTIFACTORY_DOWNLOAD_URL
|
5
|
-
ARTIFACTORY_DOWNLOAD_SIZE = :ARTIFACTORY_DOWNLOAD_SIZE
|
6
|
-
end
|
7
|
-
|
8
3
|
class ArtifactoryAction < Action
|
9
4
|
def self.run(params)
|
10
5
|
Actions.verify_gem!('artifactory')
|
@@ -22,10 +17,6 @@ module Fastlane
|
|
22
17
|
}
|
23
18
|
UI.message("Uploading file: #{artifact.local_path} ...")
|
24
19
|
upload = artifact.upload(params[:repo], params[:repo_path], params[:properties])
|
25
|
-
|
26
|
-
Actions.lane_context[SharedValues::ARTIFACTORY_DOWNLOAD_URL] = upload.uri
|
27
|
-
Actions.lane_context[SharedValues::ARTIFACTORY_DOWNLOAD_SIZE] = upload.size
|
28
|
-
|
29
20
|
UI.message("Uploaded Artifact:")
|
30
21
|
UI.message("Repo: #{upload.repo}")
|
31
22
|
UI.message("URI: #{upload.uri}")
|
@@ -53,14 +44,7 @@ module Fastlane
|
|
53
44
|
end
|
54
45
|
|
55
46
|
def self.author
|
56
|
-
["koglinjg"
|
57
|
-
end
|
58
|
-
|
59
|
-
def self.output
|
60
|
-
[
|
61
|
-
['ARTIFACTORY_DOWNLOAD_URL', 'The download url for file uploaded'],
|
62
|
-
['ARTIFACTORY_DOWNLOAD_SIZE', 'The reported file size for file uploaded']
|
63
|
-
]
|
47
|
+
["koglinjg"]
|
64
48
|
end
|
65
49
|
|
66
50
|
def self.example_code
|
@@ -65,7 +65,7 @@ module Fastlane
|
|
65
65
|
platform = Actions.lane_context[Actions::SharedValues::PLATFORM_NAME]
|
66
66
|
|
67
67
|
if platform == :ios or platform.nil?
|
68
|
-
ipa_path_default = Dir["*.ipa"].
|
68
|
+
ipa_path_default = Dir["*.ipa"].last
|
69
69
|
end
|
70
70
|
|
71
71
|
if platform == :android
|
@@ -7,16 +7,13 @@ module Fastlane
|
|
7
7
|
# Raises an exception and stop the lane execution if the repo is not in a clean state
|
8
8
|
class EnsureGitStatusCleanAction < Action
|
9
9
|
def self.run(params)
|
10
|
-
|
11
|
-
repo_clean = repo_status.empty?
|
10
|
+
repo_clean = `git status --porcelain`.empty?
|
12
11
|
|
13
12
|
if repo_clean
|
14
13
|
UI.success('Git status is clean, all good! 💪')
|
15
14
|
Actions.lane_context[SharedValues::GIT_REPO_WAS_CLEAN_ON_START] = true
|
16
15
|
else
|
17
|
-
|
18
|
-
error_message += "\nUncommitted changes:\n#{repo_status}" if params[:show_uncommitted_changes]
|
19
|
-
UI.user_error!(error_message)
|
16
|
+
UI.user_error!("Git repository is dirty! Please ensure the repo is in a clean state by committing/stashing/discarding all changes first.")
|
20
17
|
end
|
21
18
|
end
|
22
19
|
|
@@ -41,24 +38,13 @@ module Fastlane
|
|
41
38
|
end
|
42
39
|
|
43
40
|
def self.author
|
44
|
-
|
41
|
+
"lmirosevic"
|
45
42
|
end
|
46
43
|
|
47
44
|
def self.example_code
|
48
45
|
['ensure_git_status_clean']
|
49
46
|
end
|
50
47
|
|
51
|
-
def self.available_options
|
52
|
-
[
|
53
|
-
FastlaneCore::ConfigItem.new(key: :show_uncommitted_changes,
|
54
|
-
env_name: "FL_ENSURE_GIT_STATUS_CLEAN_SHOW_UNCOMMITTED_CHANGES",
|
55
|
-
description: "The flag whether to show uncommitted changes if the repo is dirty",
|
56
|
-
optional: true,
|
57
|
-
default_value: false,
|
58
|
-
is_string: false)
|
59
|
-
]
|
60
|
-
end
|
61
|
-
|
62
48
|
def self.category
|
63
49
|
:source_control
|
64
50
|
end
|
@@ -250,7 +250,7 @@ module Fastlane
|
|
250
250
|
default_value: "1"),
|
251
251
|
FastlaneCore::ConfigItem.new(key: :status,
|
252
252
|
env_name: "FL_HOCKEY_STATUS",
|
253
|
-
description: "Download status: \"1\" = No user can download; \"2\" = Available for download
|
253
|
+
description: "Download status: \"1\" = No user can download; \"2\" = Available for download",
|
254
254
|
default_value: "2"),
|
255
255
|
FastlaneCore::ConfigItem.new(key: :notes_type,
|
256
256
|
env_name: "FL_HOCKEY_NOTES_TYPE",
|
@@ -128,10 +128,10 @@ module Fastlane
|
|
128
128
|
end),
|
129
129
|
FastlaneCore::ConfigItem.new(key: :platform,
|
130
130
|
env_name: "FL_UPLOAD_SYMBOLS_TO_CRASHLYTICS_PLATFORM",
|
131
|
-
description: "The platform of the app (ios,
|
131
|
+
description: "The platform of the app (ios, tvos, mac)",
|
132
132
|
default_value: "ios",
|
133
133
|
verify_block: proc do |value|
|
134
|
-
available = ['ios', '
|
134
|
+
available = ['ios', 'tvos', 'mac']
|
135
135
|
UI.user_error!("Invalid platform '#{value}', must be #{available.join(', ')}") unless available.include?(value)
|
136
136
|
end)
|
137
137
|
]
|
@@ -150,7 +150,7 @@ module Fastlane
|
|
150
150
|
end
|
151
151
|
|
152
152
|
def self.is_supported?(platform)
|
153
|
-
|
153
|
+
platform == :ios
|
154
154
|
end
|
155
155
|
|
156
156
|
def self.example_code
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Style/PercentLiteralDelimiters:
|
2
2
|
Enabled: false
|
3
|
-
|
3
|
+
|
4
4
|
# kind_of? is a good way to check a type
|
5
5
|
Style/ClassCheck:
|
6
6
|
EnforcedStyle: kind_of?
|
@@ -16,12 +16,6 @@ Style/SafeNavigation:
|
|
16
16
|
Performance/RegexpMatch:
|
17
17
|
Enabled: false
|
18
18
|
|
19
|
-
# This suggests use of `tr` instead of `gsub`. While this might be more performant,
|
20
|
-
# these methods are not at all interchangable, and behave very differently. This can
|
21
|
-
# lead to people making the substitution without considering the differences.
|
22
|
-
Performance/StringReplacement:
|
23
|
-
Enabled: false
|
24
|
-
|
25
19
|
# .length == 0 is also good, we don't always want .zero?
|
26
20
|
Style/NumericPredicate:
|
27
21
|
Enabled: false
|
@@ -29,7 +23,7 @@ Style/NumericPredicate:
|
|
29
23
|
# this would cause errors with long lanes
|
30
24
|
Metrics/BlockLength:
|
31
25
|
Enabled: false
|
32
|
-
|
26
|
+
|
33
27
|
# this is a bit buggy
|
34
28
|
Metrics/ModuleLength:
|
35
29
|
Enabled: false
|
@@ -42,23 +36,23 @@ Style/VariableNumber:
|
|
42
36
|
Style/MethodMissing:
|
43
37
|
Enabled: false
|
44
38
|
|
45
|
-
#
|
39
|
+
#
|
46
40
|
# File.chmod(0777, f)
|
47
|
-
#
|
41
|
+
#
|
48
42
|
# is easier to read than
|
49
|
-
#
|
43
|
+
#
|
50
44
|
# File.chmod(0o777, f)
|
51
|
-
#
|
45
|
+
#
|
52
46
|
Style/NumericLiteralPrefix:
|
53
47
|
Enabled: false
|
54
48
|
|
55
|
-
#
|
49
|
+
#
|
56
50
|
# command = (!clean_expired.nil? || !clean_pattern.nil?) ? CLEANUP : LIST
|
57
|
-
#
|
51
|
+
#
|
58
52
|
# is easier to read than
|
59
|
-
#
|
53
|
+
#
|
60
54
|
# command = !clean_expired.nil? || !clean_pattern.nil? ? CLEANUP : LIST
|
61
|
-
#
|
55
|
+
#
|
62
56
|
Style/TernaryParentheses:
|
63
57
|
Enabled: false
|
64
58
|
|
@@ -1,54 +1,36 @@
|
|
1
1
|
module FastlaneCore
|
2
2
|
class BuildWatcher
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
watched_build = watching_build(app_id: app_id, platform: platform)
|
8
|
-
UI.crash!("Could not find a build for app: #{app_id} on platform: #{platform}") if watched_build.nil?
|
3
|
+
# @return The build we waited for. This method will always return a build
|
4
|
+
def self.wait_for_build_processing_to_be_complete(app_id: nil, platform: nil)
|
5
|
+
# First, find the train and build version we want to watch for
|
6
|
+
processing_builds = Spaceship::TestFlight::Build.all_processing_builds(app_id: app_id, platform: platform)
|
9
7
|
|
10
|
-
|
11
|
-
|
8
|
+
watching_build = processing_builds.sort_by(&:upload_date).last # either it's still processing
|
9
|
+
watching_build ||= Spaceship::TestFlight::Build.latest(app_id: app_id, platform: platform) # or we fallback to the most recent uplaod
|
12
10
|
|
13
|
-
|
11
|
+
loop do
|
12
|
+
UI.message("Waiting for iTunes Connect to finish processing the new build (#{watching_build.train_version} - #{watching_build.build_version})")
|
14
13
|
|
15
|
-
if matched_build && matched_build.processed?
|
16
|
-
return matched_build
|
17
|
-
end
|
18
|
-
|
19
|
-
sleep 10
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
|
-
def watching_build(app_id: nil, platform: nil)
|
26
|
-
processing_builds = Spaceship::TestFlight::Build.all_processing_builds(app_id: app_id, platform: platform)
|
27
|
-
|
28
|
-
watched_build = processing_builds.sort_by(&:upload_date).last
|
29
|
-
watched_build || Spaceship::TestFlight::Build.latest(app_id: app_id, platform: platform)
|
30
|
-
end
|
31
|
-
|
32
|
-
def matching_build(watched_build: nil, app_id: nil, platform: nil)
|
33
|
-
matched_builds = Spaceship::TestFlight::Build.builds_for_train(app_id: app_id, platform: platform, train_version: watched_build.train_version)
|
34
|
-
matched_builds.find { |build| build.build_version == watched_build.build_version }
|
35
|
-
end
|
36
|
-
|
37
|
-
def report_status(build: nil)
|
38
14
|
# Due to iTunes Connect, builds disappear from the build list alltogether
|
39
15
|
# after they finished processing. Before returning this build, we have to
|
40
16
|
# wait for the build to appear in the build list again
|
41
17
|
# As this method is very often used to wait for a build, and then do something
|
42
18
|
# with it, we have to be sure that the build actually is ready
|
43
|
-
|
19
|
+
|
20
|
+
matching_builds = Spaceship::TestFlight::Build.builds_for_train(app_id: app_id, platform: platform, train_version: watching_build.train_version)
|
21
|
+
matching_build = matching_builds.find { |build| build.build_version == watching_build.build_version }
|
22
|
+
|
23
|
+
if matching_build.nil?
|
44
24
|
UI.message("Build doesn't show up in the build list any more, waiting for it to appear again")
|
45
|
-
elsif
|
46
|
-
UI.success("Build #{
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
25
|
+
elsif matching_build.active?
|
26
|
+
UI.success("Build #{matching_build.train_version} - #{matching_build.build_version} is already being tested")
|
27
|
+
return matching_build
|
28
|
+
elsif matching_build.ready_to_submit?
|
29
|
+
UI.success("Successfully finished processing the build #{matching_build.train_version} - #{matching_build.build_version}")
|
30
|
+
return matching_build
|
51
31
|
end
|
32
|
+
|
33
|
+
sleep 10
|
52
34
|
end
|
53
35
|
end
|
54
36
|
end
|
@@ -118,6 +118,11 @@ module FastlaneCore
|
|
118
118
|
FastlaneCore::Env.truthy?("TERM_PROGRAM_VERSION")
|
119
119
|
end
|
120
120
|
|
121
|
+
# Does the user use iTerm?
|
122
|
+
def self.iterm?
|
123
|
+
FastlaneCore::Env.truthy?("ITERM_SESSION_ID")
|
124
|
+
end
|
125
|
+
|
121
126
|
# Logs base directory
|
122
127
|
def self.buildlog_path
|
123
128
|
return ENV["FL_BUILDLOG_PATH"] || "~/Library/Logs"
|
@@ -208,13 +213,6 @@ module FastlaneCore
|
|
208
213
|
keychain_path
|
209
214
|
end
|
210
215
|
|
211
|
-
# @return true if XCode version is higher than 8.3
|
212
|
-
def self.xcode_at_least?(version)
|
213
|
-
FastlaneCore::UI.user_error!("Unable to locate Xcode. Please make sure to have Xcode installed on your machine") if xcode_version.nil?
|
214
|
-
v = xcode_version
|
215
|
-
Gem::Version.new(v) >= Gem::Version.new(version)
|
216
|
-
end
|
217
|
-
|
218
216
|
# @return the full path to the iTMSTransporter executable
|
219
217
|
def self.itms_path
|
220
218
|
return ENV["FASTLANE_ITUNES_TRANSPORTER_PATH"] if FastlaneCore::Env.truthy?("FASTLANE_ITUNES_TRANSPORTER_PATH")
|
@@ -376,10 +376,7 @@ module FastlaneCore
|
|
376
376
|
def load_password_for_transporter
|
377
377
|
# 3 different sources for the password
|
378
378
|
# 1) ENV variable for application specific password
|
379
|
-
if ENV[TWO_FACTOR_ENV_VARIABLE].to_s.length > 0
|
380
|
-
UI.message("Fetching password for transporter from environment variable named `#{TWO_FACTOR_ENV_VARIABLE}`")
|
381
|
-
return ENV[TWO_FACTOR_ENV_VARIABLE]
|
382
|
-
end
|
379
|
+
return ENV[TWO_FACTOR_ENV_VARIABLE] if ENV[TWO_FACTOR_ENV_VARIABLE].to_s.length > 0
|
383
380
|
# 2) TWO_STEP_HOST_PREFIX from keychain
|
384
381
|
account_manager = CredentialsManager::AccountManager.new(user: @user,
|
385
382
|
prefix: TWO_STEP_HOST_PREFIX,
|
@@ -44,7 +44,7 @@ module FastlaneCore
|
|
44
44
|
value = ""
|
45
45
|
array.each do |l|
|
46
46
|
colored_line = l
|
47
|
-
colored_line = "#{colors.first}#{l}#{colors.last}" if colors.length > 0
|
47
|
+
colored_line = "#{colors.first[0]}#{l}#{colors.last[0]}" if colors.length > 0
|
48
48
|
value << colored_line
|
49
49
|
value << "\n"
|
50
50
|
end
|
@@ -68,10 +68,15 @@ module FastlaneCore
|
|
68
68
|
return value.middle_truncate(max_value_length)
|
69
69
|
elsif transform == :newline
|
70
70
|
# remove all fixed newlines as it may mess up the output
|
71
|
-
value.
|
71
|
+
value.tr!("\n", " ") if value.kind_of?(String)
|
72
72
|
if value.length >= max_value_length
|
73
|
-
colors = value.scan(
|
74
|
-
colors
|
73
|
+
colors = value.scan(/(\e\[.*?m)/)
|
74
|
+
if colors && colors.length > 0
|
75
|
+
colors.each do |color|
|
76
|
+
value.delete!(color.first)
|
77
|
+
value.delete!(color.last)
|
78
|
+
end
|
79
|
+
end
|
75
80
|
lines = value.wordwrap(max_value_length)
|
76
81
|
return colorize_array(lines, colors)
|
77
82
|
end
|
@@ -279,14 +279,9 @@ module FastlaneCore
|
|
279
279
|
def build_xcodebuild_showbuildsettings_command
|
280
280
|
# We also need to pass the workspace and scheme to this command.
|
281
281
|
#
|
282
|
-
# The 'clean' portion of this command
|
283
|
-
# This xcodebuild bug is fixed in Xcode 8.3 so 'clean' it's not necessary anymore
|
282
|
+
# The 'clean' portion of this command is a workaround for an xcodebuild bug with Core Data projects.
|
284
283
|
# See: https://github.com/fastlane/fastlane/pull/5626
|
285
|
-
|
286
|
-
command = "xcodebuild -showBuildSettings #{xcodebuild_parameters.join(' ')}"
|
287
|
-
else
|
288
|
-
command = "xcodebuild clean -showBuildSettings #{xcodebuild_parameters.join(' ')}"
|
289
|
-
end
|
284
|
+
command = "xcodebuild clean -showBuildSettings #{xcodebuild_parameters.join(' ')}"
|
290
285
|
command += " 2> /dev/null" if xcodebuild_suppress_stderr
|
291
286
|
command
|
292
287
|
end
|
@@ -296,16 +291,9 @@ module FastlaneCore
|
|
296
291
|
# @param [String] The key of which we want the value for (e.g. "PRODUCT_NAME")
|
297
292
|
def build_settings(key: nil, optional: true)
|
298
293
|
unless @build_settings
|
299
|
-
if is_workspace
|
300
|
-
if schemes.count == 0
|
301
|
-
UI.user_error!("Could not find any schemes for Xcode workspace at path '#{self.path}'. Please make sure that the schemes you want to use are marked as `Shared` from Xcode.")
|
302
|
-
end
|
303
|
-
options[:scheme] ||= schemes.first
|
304
|
-
end
|
305
|
-
|
306
294
|
command = build_xcodebuild_showbuildsettings_command
|
307
295
|
|
308
|
-
#
|
296
|
+
# xcode might hang here and retrying fixes the problem, see fastlane#4059
|
309
297
|
begin
|
310
298
|
timeout = FastlaneCore::Project.xcode_build_settings_timeout
|
311
299
|
retries = FastlaneCore::Project.xcode_build_settings_retries
|
@@ -339,7 +327,7 @@ module FastlaneCore
|
|
339
327
|
|
340
328
|
# Returns the build settings and sets the default scheme to the options hash
|
341
329
|
def default_build_settings(key: nil, optional: true)
|
342
|
-
options[:scheme]
|
330
|
+
options[:scheme] = schemes.first if is_workspace
|
343
331
|
build_settings(key: key, optional: optional)
|
344
332
|
end
|
345
333
|
|