highway 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/highway/runtime/context.rb +2 -2
- data/lib/highway/steps/library/xcode_test.rb +32 -20
- data/lib/highway/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73c3b2d6c45a2813f981ce86191943dba7c3774da04ad24ada4aae9caef2ed76
|
4
|
+
data.tar.gz: 24e6239b66417a222f2ffc21c97060a407442e94c1670b12fb6acfe94b58b46b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c90c5b3b82ae4bf4a65d1c895da8dc3b0c293650351154621478b9fdcecc40ce58d9c98aed012535a66423d58d664334a340cbdeb4df7bdfeeabfa1236db98d9
|
7
|
+
data.tar.gz: 92ed02e66e35dfe8b0f2837f48302d72549770800175066480c2e435388d5813189ce3491c9fc0709ac3c374abfa9dfadac4047b8dc361f505d257d413f7e7de
|
@@ -200,9 +200,9 @@ module Highway
|
|
200
200
|
# @param bundle_exec [Boolean] Whether to use `bundle exec` if possible.
|
201
201
|
# @param silent [Boolean] Whether to run the command silently.
|
202
202
|
# @param on_error [Proc] Called if command exits with a non-zero code.
|
203
|
-
def run_sh(command, bundle_exec: false, silent: false,
|
203
|
+
def run_sh(command, bundle_exec: false, silent: false, on_error: nil)
|
204
204
|
command = ["bundle exec", command].flatten if bundle_exec && should_use_bundle_exec?
|
205
|
-
Fastlane::Actions.sh(command, log: !silent, error_callback:
|
205
|
+
Fastlane::Actions.sh(command, log: !silent, error_callback: on_error)
|
206
206
|
end
|
207
207
|
|
208
208
|
private
|
@@ -68,7 +68,12 @@ module Highway
|
|
68
68
|
name: "code_coverage",
|
69
69
|
type: Types::Bool.new(),
|
70
70
|
required: false,
|
71
|
-
)
|
71
|
+
),
|
72
|
+
Parameters::Single.new(
|
73
|
+
name: "fastlane_params",
|
74
|
+
type: Types::Hash.new(Types::Any.new()),
|
75
|
+
required: false
|
76
|
+
),
|
72
77
|
]
|
73
78
|
end
|
74
79
|
|
@@ -83,6 +88,7 @@ module Highway
|
|
83
88
|
scheme = parameters["scheme"]
|
84
89
|
skip_build = parameters["skip_build"]
|
85
90
|
code_coverage = parameters["code_coverage"]
|
91
|
+
fastlane_params = parameters["fastlane_params"]
|
86
92
|
|
87
93
|
flags = parameters["flags"].join(" ")
|
88
94
|
settings = parameters["settings"].map { |setting, value| "#{setting}=\"#{value.shellescape}\"" }.join(" ")
|
@@ -120,29 +126,31 @@ module Highway
|
|
120
126
|
rescued_error = nil
|
121
127
|
|
122
128
|
# Run the build and test.
|
129
|
+
options = {
|
123
130
|
|
124
|
-
|
125
|
-
|
126
|
-
context.run_action("run_tests", options: {
|
131
|
+
project_key => project_value,
|
127
132
|
|
128
|
-
|
133
|
+
clean: clean,
|
134
|
+
configuration: configuration,
|
135
|
+
device: device,
|
136
|
+
scheme: scheme,
|
137
|
+
code_coverage: code_coverage,
|
138
|
+
skip_build: skip_build,
|
129
139
|
|
130
|
-
|
131
|
-
configuration: configuration,
|
132
|
-
device: device,
|
133
|
-
scheme: scheme,
|
134
|
-
code_coverage: code_coverage,
|
135
|
-
skip_build: skip_build,
|
140
|
+
xcargs: xcargs,
|
136
141
|
|
137
|
-
|
142
|
+
buildlog_path: output_raw_temp_dir,
|
143
|
+
output_directory: output_dir,
|
144
|
+
output_types: output_types,
|
145
|
+
output_files: output_files,
|
146
|
+
xcodebuild_formatter: xcodebuild_formatter,
|
138
147
|
|
139
|
-
|
140
|
-
output_directory: output_dir,
|
141
|
-
output_types: output_types,
|
142
|
-
output_files: output_files,
|
143
|
-
xcodebuild_formatter: xcodebuild_formatter,
|
148
|
+
}
|
144
149
|
|
145
|
-
|
150
|
+
begin
|
151
|
+
fastlane_params = fastlane_params.nil? ? {} : fastlane_params
|
152
|
+
combined_options = fastlane_params.merge(options)
|
153
|
+
context.run_action("run_tests", options: combined_options)
|
146
154
|
|
147
155
|
rescue FastlaneCore::Interface::FastlaneBuildFailure => error
|
148
156
|
|
@@ -184,11 +192,15 @@ module Highway
|
|
184
192
|
# That will output a machine-readable information about everything
|
185
193
|
# that happened in the build.
|
186
194
|
|
187
|
-
|
195
|
+
error_callback = ->(error) {
|
196
|
+
rescued_error = error
|
197
|
+
}
|
198
|
+
|
199
|
+
xcpretty_json_formatter_path = context.run_sh("xcpretty-json-formatter", bundle_exec: true, silent: true, on_error: error_callback)
|
188
200
|
temp_json_report_path = File.join(Dir.mktmpdir(), "report.json")
|
189
201
|
|
190
202
|
context.with_modified_env({"XCPRETTY_JSON_FILE_OUTPUT" => temp_json_report_path}) do
|
191
|
-
context.run_sh(["cat", output_raw_path, "| xcpretty --formatter", xcpretty_json_formatter_path], bundle_exec: true, silent: true)
|
203
|
+
context.run_sh(["cat", output_raw_path, "| xcpretty --formatter", xcpretty_json_formatter_path], bundle_exec: true, silent: true, on_error: error_callback)
|
192
204
|
end
|
193
205
|
|
194
206
|
# Export JSON file report to environment variable
|
data/lib/highway/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: highway
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Netguru
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fastlane
|