fastlane-plugin-sq_ci 0.5.1 → 0.5.2
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/lib/fastlane/plugin/sq_ci/actions/sq_ci_get_bundle_identifier_action.rb +1 -1
- data/lib/fastlane/plugin/sq_ci/actions/sq_ci_get_team_identifier_action.rb +1 -1
- data/lib/fastlane/plugin/sq_ci/helper/sq_ci_helper.rb +42 -40
- data/lib/fastlane/plugin/sq_ci/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 360047a92a80c2359893f50bce21f89bdf09e9816af3803cb190904a1d01d23a
|
4
|
+
data.tar.gz: 45ccbb162071a69764a8e177de6f0a4c2f5eb3a9dc1b03f861f54d6fc5930c30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d03fa374e78f4a8fb189a5db71d0e5611e1ce9580d4ffd48e265ce2880cccfa31276b7b46f8cf77a66ef04b6e42b6e14301e0f44132fe5d8b83417425c13e340
|
7
|
+
data.tar.gz: 8889c93fb1cb84e8950de504caa20fd7970df9b0ae35fd24b8d4afc994b69a22932f874322e60ee974947a90928a36b0082b5ed5b335bbc0051771708cd5ffdf
|
@@ -12,7 +12,7 @@ module Fastlane
|
|
12
12
|
end
|
13
13
|
|
14
14
|
build_configuration = Helper::SqCiHelper.get_xcodeproj_build_config(project_path, params[:main_target], params[:scheme])
|
15
|
-
build_configuration
|
15
|
+
Helper::SqCiHelper.resolve_recursive_build_setting(build_configuration, 'PRODUCT_BUNDLE_IDENTIFIER')
|
16
16
|
end
|
17
17
|
|
18
18
|
def self.description
|
@@ -12,7 +12,7 @@ module Fastlane
|
|
12
12
|
end
|
13
13
|
|
14
14
|
build_configuration = Helper::SqCiHelper.get_xcodeproj_build_config(project_path, params[:main_target], params[:scheme])
|
15
|
-
build_configuration
|
15
|
+
Helper::SqCiHelper.resolve_recursive_build_setting(build_configuration, 'DEVELOPMENT_TEAM')
|
16
16
|
end
|
17
17
|
|
18
18
|
def self.description
|
@@ -135,57 +135,59 @@ 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
|
-
|
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
|
138
|
+
target = project.native_targets.find { |native_target| native_target.name == main_target }
|
139
|
+
target.build_configurations.find { |configuration| configuration.name == target_scheme }
|
153
140
|
end
|
154
141
|
|
155
142
|
def self.get_xcodeproj_targets(xcodeproj_path, target_scheme)
|
156
143
|
project = Xcodeproj::Project.open(xcodeproj_path)
|
157
|
-
|
158
144
|
targets = {}
|
159
|
-
project.
|
160
|
-
build_configuration =
|
161
|
-
targets[
|
145
|
+
project.native_targets.each do |native_target|
|
146
|
+
build_configuration = native_target.build_configurations.find { |configuration| configuration.name == target_scheme }
|
147
|
+
targets[native_target.name] = self.resolve_recursive_build_setting(build_configuration, 'PRODUCT_BUNDLE_IDENTIFIER')
|
162
148
|
end
|
163
149
|
|
164
150
|
targets
|
165
151
|
end
|
166
152
|
|
167
|
-
def self.
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
153
|
+
def self.resolve_recursive_build_setting(config, setting)
|
154
|
+
resolution = config.resolve_build_setting(setting)
|
155
|
+
|
156
|
+
# finds values with one of
|
157
|
+
# $VALUE
|
158
|
+
# $(VALLUE)
|
159
|
+
# $(VALUE:modifier)
|
160
|
+
# ${VALUE}
|
161
|
+
# ${VALUE:modifier}
|
162
|
+
resolution.gsub(/\$[\(\{]?.+[\)\}]?/) do |raw_value|
|
163
|
+
# strip $() characters
|
164
|
+
unresolved = raw_value.gsub(/[\$\(\)\{\}]/, '')
|
165
|
+
|
166
|
+
# Get the modifiers after the ':' characters
|
167
|
+
name, *modifiers = unresolved.split(':')
|
168
|
+
|
169
|
+
# Expand variable name
|
170
|
+
subresolution = resolve_recursive_build_setting(config, name)
|
171
|
+
|
172
|
+
# Apply modifiers
|
173
|
+
# NOTE: not all cases accounted for
|
174
|
+
#
|
175
|
+
# See http://codeworkshop.net/posts/xcode-build-setting-transformations
|
176
|
+
# for various modifier options
|
177
|
+
modifiers.each do |modifier|
|
178
|
+
case modifier
|
179
|
+
when 'lower'
|
180
|
+
subresolution.downcase!
|
181
|
+
when 'upper'
|
182
|
+
subresolution.upcase!
|
183
|
+
else
|
184
|
+
# Fastlane message
|
185
|
+
UI.error("Unknown modifier: `#{modifier}` in `#{raw_value}")
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
subresolution
|
187
190
|
end
|
188
|
-
configuration
|
189
191
|
end
|
190
192
|
end
|
191
193
|
end
|