fastlane-plugin-sq_ci 0.5.0 → 0.5.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d78148f8b4b871b6fb375d6131e4db8719cd32e4f055a8a0ae27d3ce1392e0b7
|
4
|
+
data.tar.gz: 40a69c0951782de0b44c9757e210ba90a2c74442e8c60394a61555fa98fe58a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 370eeeb1362e7d52d095ccbf7b88abc293531fab7bd93a68cdc2f8d480ee907b6897305d566e60bf61942343266bbd7946b851f257d3e5729c4e80c122ccac70
|
7
|
+
data.tar.gz: 2b33b80d066c9206d7e3ab785e80cd1f5465b7fff77868d86c9808050a97212bc49d50da1775c0924f8d89b1c1f3b439f3a5633e01e2527e5e5d76d70c9738f7
|
@@ -135,20 +135,58 @@ module Fastlane
|
|
135
135
|
|
136
136
|
def self.get_xcodeproj_build_config(xcodeproj_path, main_target, target_scheme)
|
137
137
|
project = Xcodeproj::Project.open(xcodeproj_path)
|
138
|
-
|
139
|
-
|
138
|
+
xcscheme = self.xcscheme(xcodeproj_path, target_scheme)
|
139
|
+
target_uuids = xcscheme.build_action.entries.first.buildable_references.map(&:target_uuid)
|
140
|
+
|
141
|
+
targets = project.targets.find_all { |t| target_uuids.include?(t.uuid) }
|
142
|
+
if main_target.nil?
|
143
|
+
build_configuration = xcbuildconfiguration(targets.first, target_scheme)
|
144
|
+
else
|
145
|
+
target = targets.find { |t| t.name == main_target }
|
146
|
+
|
147
|
+
UI.user_error!("Target '#{main_target}' does not exist in the given scheme") if target.nil?
|
148
|
+
|
149
|
+
build_configuration = xcbuildconfiguration(target, target_scheme)
|
150
|
+
end
|
151
|
+
|
152
|
+
build_configuration
|
140
153
|
end
|
141
154
|
|
142
155
|
def self.get_xcodeproj_targets(xcodeproj_path, target_scheme)
|
143
156
|
project = Xcodeproj::Project.open(xcodeproj_path)
|
157
|
+
|
144
158
|
targets = {}
|
145
|
-
project.
|
146
|
-
build_configuration =
|
147
|
-
targets[
|
159
|
+
project.targets.each do |target|
|
160
|
+
build_configuration = xcbuildconfiguration(target, target_scheme)
|
161
|
+
targets[target.name] = build_configuration.build_settings['PRODUCT_BUNDLE_IDENTIFIER']
|
148
162
|
end
|
149
163
|
|
150
164
|
targets
|
151
165
|
end
|
166
|
+
|
167
|
+
def self.xcscheme(xcodeproj_path, target_scheme)
|
168
|
+
scheme_paths = Dir.glob("#{xcodeproj_path}/xcshareddata/xcschemes/#{target_scheme}.xcscheme")
|
169
|
+
if scheme_paths.empty?
|
170
|
+
scheme_paths = Dir.glob("#{xcodeproj_path}/xcuserdata/xcschemes/#{target_scheme}.xcscheme")
|
171
|
+
end
|
172
|
+
UI.user_error!("Scheme '#{target_scheme}' does not exist in the given project") if scheme_paths.empty?
|
173
|
+
|
174
|
+
scheme_path = scheme_paths.first
|
175
|
+
Xcodeproj::XCScheme.new(scheme_path)
|
176
|
+
end
|
177
|
+
|
178
|
+
def self.xcbuildconfiguration(target, build_configuration_name)
|
179
|
+
if build_configuration_name.nil?
|
180
|
+
configuration = target.build_configurations.first
|
181
|
+
|
182
|
+
UI.message("No configuration specified, taking first: '#{configuration.name}'")
|
183
|
+
else
|
184
|
+
configuration = target.build_configurations.find { |c| c.name == build_configuration_name }
|
185
|
+
|
186
|
+
UI.user_error!("Build configuration '#{build_configuration_name}' does not exist in target '#{target.name}'") if configuration.nil?
|
187
|
+
end
|
188
|
+
configuration
|
189
|
+
end
|
152
190
|
end
|
153
191
|
end
|
154
192
|
end
|