fastlane-plugin-sq_ci 0.5.0 → 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 +41 -1
- 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
|
@@ -144,11 +144,51 @@ module Fastlane
|
|
144
144
|
targets = {}
|
145
145
|
project.native_targets.each do |native_target|
|
146
146
|
build_configuration = native_target.build_configurations.find { |configuration| configuration.name == target_scheme }
|
147
|
-
targets[native_target.name] = build_configuration
|
147
|
+
targets[native_target.name] = self.resolve_recursive_build_setting(build_configuration, 'PRODUCT_BUNDLE_IDENTIFIER')
|
148
148
|
end
|
149
149
|
|
150
150
|
targets
|
151
151
|
end
|
152
|
+
|
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
|
190
|
+
end
|
191
|
+
end
|
152
192
|
end
|
153
193
|
end
|
154
194
|
end
|