cocoapods 1.9.1 → 1.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +292 -5
- data/README.md +2 -1
- data/lib/cocoapods/command/lib/lint.rb +12 -3
- data/lib/cocoapods/command/repo/push.rb +1 -1
- data/lib/cocoapods/command/repo/update.rb +11 -0
- data/lib/cocoapods/command/spec/lint.rb +12 -3
- data/lib/cocoapods/command.rb +12 -2
- data/lib/cocoapods/config.rb +17 -0
- data/lib/cocoapods/downloader/cache.rb +2 -2
- data/lib/cocoapods/gem_version.rb +1 -1
- data/lib/cocoapods/generator/app_target_helper.rb +10 -2
- data/lib/cocoapods/generator/copy_dsyms_script.rb +56 -0
- data/lib/cocoapods/generator/copy_resources_script.rb +2 -14
- data/lib/cocoapods/generator/copy_xcframework_script.rb +245 -0
- data/lib/cocoapods/generator/embed_frameworks_script.rb +125 -212
- data/lib/cocoapods/generator/script_phase_constants.rb +99 -0
- data/lib/cocoapods/installer/analyzer/target_inspection_result.rb +1 -1
- data/lib/cocoapods/installer/analyzer.rb +17 -8
- data/lib/cocoapods/installer/base_install_hooks_context.rb +135 -0
- data/lib/cocoapods/installer/installation_options.rb +5 -0
- data/lib/cocoapods/installer/pod_source_installer.rb +2 -1
- data/lib/cocoapods/installer/post_install_hooks_context.rb +1 -127
- data/lib/cocoapods/installer/post_integrate_hooks_context.rb +9 -0
- data/lib/cocoapods/installer/project_cache/project_metadata_cache.rb +4 -0
- data/lib/cocoapods/installer/sandbox_dir_cleaner.rb +2 -1
- data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +132 -111
- data/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb +13 -27
- data/lib/cocoapods/installer/xcode/pods_project_generator/app_host_installer.rb +5 -1
- data/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb +2 -1
- data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_dependency_installer.rb +8 -6
- data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb +187 -61
- data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb +61 -30
- data/lib/cocoapods/installer/xcode/pods_project_generator/project_generator.rb +3 -2
- data/lib/cocoapods/installer/xcode/pods_project_generator/target_installation_result.rb +5 -7
- data/lib/cocoapods/installer/xcode/pods_project_generator.rb +45 -6
- data/lib/cocoapods/installer/xcode/pods_project_generator_result.rb +19 -0
- data/lib/cocoapods/installer/xcode/target_validator.rb +1 -1
- data/lib/cocoapods/installer.rb +70 -3
- data/lib/cocoapods/sandbox/file_accessor.rb +10 -1
- data/lib/cocoapods/sources_manager.rb +2 -1
- data/lib/cocoapods/target/aggregate_target.rb +35 -0
- data/lib/cocoapods/target/build_settings.rb +94 -18
- data/lib/cocoapods/target/pod_target.rb +85 -11
- data/lib/cocoapods/target.rb +44 -2
- data/lib/cocoapods/user_interface/error_report.rb +1 -1
- data/lib/cocoapods/user_interface/inspector_reporter.rb +3 -10
- data/lib/cocoapods/validator.rb +38 -12
- data/lib/cocoapods/xcode/framework_paths.rb +1 -1
- data/lib/cocoapods/xcode/xcframework/xcframework_slice.rb +91 -4
- data/lib/cocoapods/xcode/xcframework.rb +17 -4
- data/lib/cocoapods.rb +3 -1
- metadata +31 -53
- data/lib/cocoapods/generator/prepare_artifacts_script.rb +0 -257
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy Duran
|
8
8
|
- Fabio Pelosin
|
9
9
|
- Kyle Fuller
|
10
10
|
- Samuel Giddins
|
11
|
-
autorequire:
|
11
|
+
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2021-07-28 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: cocoapods-core
|
@@ -19,14 +19,14 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.
|
22
|
+
version: 1.10.2
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
29
|
+
version: 1.10.2
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: claide
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,7 +73,7 @@ dependencies:
|
|
73
73
|
requirements:
|
74
74
|
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: 1.
|
76
|
+
version: 1.4.0
|
77
77
|
- - "<"
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '2.0'
|
@@ -83,7 +83,7 @@ dependencies:
|
|
83
83
|
requirements:
|
84
84
|
- - ">="
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version: 1.
|
86
|
+
version: 1.4.0
|
87
87
|
- - "<"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '2.0'
|
@@ -127,26 +127,6 @@ dependencies:
|
|
127
127
|
- - "<"
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '2.0'
|
130
|
-
- !ruby/object:Gem::Dependency
|
131
|
-
name: cocoapods-stats
|
132
|
-
requirement: !ruby/object:Gem::Requirement
|
133
|
-
requirements:
|
134
|
-
- - ">="
|
135
|
-
- !ruby/object:Gem::Version
|
136
|
-
version: 1.0.0
|
137
|
-
- - "<"
|
138
|
-
- !ruby/object:Gem::Version
|
139
|
-
version: '2.0'
|
140
|
-
type: :runtime
|
141
|
-
prerelease: false
|
142
|
-
version_requirements: !ruby/object:Gem::Requirement
|
143
|
-
requirements:
|
144
|
-
- - ">="
|
145
|
-
- !ruby/object:Gem::Version
|
146
|
-
version: 1.0.0
|
147
|
-
- - "<"
|
148
|
-
- !ruby/object:Gem::Version
|
149
|
-
version: '2.0'
|
150
130
|
- !ruby/object:Gem::Dependency
|
151
131
|
name: cocoapods-trunk
|
152
132
|
requirement: !ruby/object:Gem::Requirement
|
@@ -207,7 +187,7 @@ dependencies:
|
|
207
187
|
requirements:
|
208
188
|
- - ">="
|
209
189
|
- !ruby/object:Gem::Version
|
210
|
-
version: 1.
|
190
|
+
version: 1.19.0
|
211
191
|
- - "<"
|
212
192
|
- !ruby/object:Gem::Version
|
213
193
|
version: '2.0'
|
@@ -217,30 +197,10 @@ dependencies:
|
|
217
197
|
requirements:
|
218
198
|
- - ">="
|
219
199
|
- !ruby/object:Gem::Version
|
220
|
-
version: 1.
|
200
|
+
version: 1.19.0
|
221
201
|
- - "<"
|
222
202
|
- !ruby/object:Gem::Version
|
223
203
|
version: '2.0'
|
224
|
-
- !ruby/object:Gem::Dependency
|
225
|
-
name: activesupport
|
226
|
-
requirement: !ruby/object:Gem::Requirement
|
227
|
-
requirements:
|
228
|
-
- - ">="
|
229
|
-
- !ruby/object:Gem::Version
|
230
|
-
version: 4.0.2
|
231
|
-
- - "<"
|
232
|
-
- !ruby/object:Gem::Version
|
233
|
-
version: '5'
|
234
|
-
type: :runtime
|
235
|
-
prerelease: false
|
236
|
-
version_requirements: !ruby/object:Gem::Requirement
|
237
|
-
requirements:
|
238
|
-
- - ">="
|
239
|
-
- !ruby/object:Gem::Version
|
240
|
-
version: 4.0.2
|
241
|
-
- - "<"
|
242
|
-
- !ruby/object:Gem::Version
|
243
|
-
version: '5'
|
244
204
|
- !ruby/object:Gem::Dependency
|
245
205
|
name: colored2
|
246
206
|
requirement: !ruby/object:Gem::Requirement
|
@@ -331,6 +291,20 @@ dependencies:
|
|
331
291
|
- - "~>"
|
332
292
|
- !ruby/object:Gem::Version
|
333
293
|
version: '1.4'
|
294
|
+
- !ruby/object:Gem::Dependency
|
295
|
+
name: addressable
|
296
|
+
requirement: !ruby/object:Gem::Requirement
|
297
|
+
requirements:
|
298
|
+
- - "~>"
|
299
|
+
- !ruby/object:Gem::Version
|
300
|
+
version: '2.6'
|
301
|
+
type: :runtime
|
302
|
+
prerelease: false
|
303
|
+
version_requirements: !ruby/object:Gem::Requirement
|
304
|
+
requirements:
|
305
|
+
- - "~>"
|
306
|
+
- !ruby/object:Gem::Version
|
307
|
+
version: '2.6'
|
334
308
|
- !ruby/object:Gem::Dependency
|
335
309
|
name: bacon
|
336
310
|
requirement: !ruby/object:Gem::Requirement
|
@@ -452,7 +426,9 @@ files:
|
|
452
426
|
- lib/cocoapods/generator/app_target_helper.rb
|
453
427
|
- lib/cocoapods/generator/bridge_support.rb
|
454
428
|
- lib/cocoapods/generator/constant.rb
|
429
|
+
- lib/cocoapods/generator/copy_dsyms_script.rb
|
455
430
|
- lib/cocoapods/generator/copy_resources_script.rb
|
431
|
+
- lib/cocoapods/generator/copy_xcframework_script.rb
|
456
432
|
- lib/cocoapods/generator/dummy_source.rb
|
457
433
|
- lib/cocoapods/generator/embed_frameworks_script.rb
|
458
434
|
- lib/cocoapods/generator/file_list.rb
|
@@ -460,7 +436,7 @@ files:
|
|
460
436
|
- lib/cocoapods/generator/info_plist_file.rb
|
461
437
|
- lib/cocoapods/generator/module_map.rb
|
462
438
|
- lib/cocoapods/generator/prefix_header.rb
|
463
|
-
- lib/cocoapods/generator/
|
439
|
+
- lib/cocoapods/generator/script_phase_constants.rb
|
464
440
|
- lib/cocoapods/generator/umbrella_header.rb
|
465
441
|
- lib/cocoapods/hooks_manager.rb
|
466
442
|
- lib/cocoapods/installer.rb
|
@@ -474,11 +450,13 @@ files:
|
|
474
450
|
- lib/cocoapods/installer/analyzer/specs_state.rb
|
475
451
|
- lib/cocoapods/installer/analyzer/target_inspection_result.rb
|
476
452
|
- lib/cocoapods/installer/analyzer/target_inspector.rb
|
453
|
+
- lib/cocoapods/installer/base_install_hooks_context.rb
|
477
454
|
- lib/cocoapods/installer/installation_options.rb
|
478
455
|
- lib/cocoapods/installer/pod_source_installer.rb
|
479
456
|
- lib/cocoapods/installer/pod_source_preparer.rb
|
480
457
|
- lib/cocoapods/installer/podfile_validator.rb
|
481
458
|
- lib/cocoapods/installer/post_install_hooks_context.rb
|
459
|
+
- lib/cocoapods/installer/post_integrate_hooks_context.rb
|
482
460
|
- lib/cocoapods/installer/pre_install_hooks_context.rb
|
483
461
|
- lib/cocoapods/installer/project_cache/project_cache.rb
|
484
462
|
- lib/cocoapods/installer/project_cache/project_cache_analysis_result.rb
|
@@ -545,7 +523,7 @@ homepage: https://github.com/CocoaPods/CocoaPods
|
|
545
523
|
licenses:
|
546
524
|
- MIT
|
547
525
|
metadata: {}
|
548
|
-
post_install_message:
|
526
|
+
post_install_message:
|
549
527
|
rdoc_options: []
|
550
528
|
require_paths:
|
551
529
|
- lib
|
@@ -553,7 +531,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
553
531
|
requirements:
|
554
532
|
- - ">="
|
555
533
|
- !ruby/object:Gem::Version
|
556
|
-
version: 2.
|
534
|
+
version: 2.3.3
|
557
535
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
558
536
|
requirements:
|
559
537
|
- - ">="
|
@@ -561,7 +539,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
561
539
|
version: '0'
|
562
540
|
requirements: []
|
563
541
|
rubygems_version: 3.0.3
|
564
|
-
signing_key:
|
542
|
+
signing_key:
|
565
543
|
specification_version: 3
|
566
544
|
summary: The Cocoa library package manager.
|
567
545
|
test_files: []
|
@@ -1,257 +0,0 @@
|
|
1
|
-
require 'cocoapods/xcode'
|
2
|
-
|
3
|
-
module Pod
|
4
|
-
module Generator
|
5
|
-
class PrepareArtifactsScript
|
6
|
-
# @return [Hash{String => Array<Pod::Xcode::XCFramework>}] Multiple lists of xcframeworks per
|
7
|
-
# configuration.
|
8
|
-
#
|
9
|
-
attr_reader :xcframeworks_by_config
|
10
|
-
|
11
|
-
# @return [Pathname] the root directory of the sandbox
|
12
|
-
#
|
13
|
-
attr_reader :sandbox_root
|
14
|
-
|
15
|
-
# @return [Platform] the platform of the target for which this script will run
|
16
|
-
#
|
17
|
-
attr_reader :platform
|
18
|
-
|
19
|
-
# @param [Hash{String => Array<Pod::Xcode::XCFramework>] xcframeworks_by_config
|
20
|
-
# @see #xcframeworks_by_config
|
21
|
-
#
|
22
|
-
# @param [Pathname] sandbox_root
|
23
|
-
# the sandbox root of the installation
|
24
|
-
#
|
25
|
-
# @param [Platform] platform
|
26
|
-
# the platform of the target for which this script will run
|
27
|
-
#
|
28
|
-
def initialize(xcframeworks_by_config, sandbox_root, platform)
|
29
|
-
@xcframeworks_by_config = xcframeworks_by_config
|
30
|
-
@sandbox_root = sandbox_root
|
31
|
-
@platform = platform
|
32
|
-
end
|
33
|
-
|
34
|
-
# Saves the resource script to the given pathname.
|
35
|
-
#
|
36
|
-
# @param [Pathname] pathname
|
37
|
-
# The path where the embed frameworks script should be saved.
|
38
|
-
#
|
39
|
-
# @return [void]
|
40
|
-
#
|
41
|
-
def save_as(pathname)
|
42
|
-
pathname.open('w') do |file|
|
43
|
-
file.puts(script)
|
44
|
-
end
|
45
|
-
File.chmod(0o755, pathname.to_s)
|
46
|
-
end
|
47
|
-
|
48
|
-
# @return [String] The contents of the embed frameworks script.
|
49
|
-
#
|
50
|
-
def generate
|
51
|
-
script
|
52
|
-
end
|
53
|
-
|
54
|
-
private
|
55
|
-
|
56
|
-
# @!group Private Helpers
|
57
|
-
|
58
|
-
# @return [String] The contents of the prepare artifacts script.
|
59
|
-
#
|
60
|
-
def script
|
61
|
-
script = <<-SH.strip_heredoc
|
62
|
-
#!/bin/sh
|
63
|
-
set -e
|
64
|
-
set -u
|
65
|
-
set -o pipefail
|
66
|
-
|
67
|
-
function on_error {
|
68
|
-
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
|
69
|
-
}
|
70
|
-
trap 'on_error $LINENO' ERR
|
71
|
-
|
72
|
-
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
|
73
|
-
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
|
74
|
-
# frameworks to, so exit 0 (signalling the script phase was successful).
|
75
|
-
exit 0
|
76
|
-
fi
|
77
|
-
|
78
|
-
# This protects against multiple targets copying the same framework dependency at the same time. The solution
|
79
|
-
# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html
|
80
|
-
RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????")
|
81
|
-
|
82
|
-
ARTIFACT_LIST_FILE="${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt"
|
83
|
-
cat > $ARTIFACT_LIST_FILE
|
84
|
-
|
85
|
-
BCSYMBOLMAP_DIR="BCSymbolMaps"
|
86
|
-
|
87
|
-
record_artifact()
|
88
|
-
{
|
89
|
-
echo "$1" >> $ARTIFACT_LIST_FILE
|
90
|
-
}
|
91
|
-
|
92
|
-
install_artifact()
|
93
|
-
{
|
94
|
-
local source="$1"
|
95
|
-
local destination="$2"
|
96
|
-
local record=${3:-false}
|
97
|
-
|
98
|
-
# Use filter instead of exclude so missing patterns don't throw errors.
|
99
|
-
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \\"- CVS/\\" --filter \\"- .svn/\\" --filter \\"- .git/\\" --filter \\"- .hg/\\" \\"${source}\\" \\"${destination}\\""
|
100
|
-
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" "${source}" "${destination}"
|
101
|
-
|
102
|
-
if [[ "$record" == "true" ]]; then
|
103
|
-
artifact="${destination}/$(basename "$source")"
|
104
|
-
record_artifact "$artifact"
|
105
|
-
fi
|
106
|
-
}
|
107
|
-
|
108
|
-
# Copies a framework to derived data for use in later build phases
|
109
|
-
install_framework()
|
110
|
-
{
|
111
|
-
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
|
112
|
-
local source="${BUILT_PRODUCTS_DIR}/$1"
|
113
|
-
elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
|
114
|
-
local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
|
115
|
-
elif [ -r "$1" ]; then
|
116
|
-
local source="$1"
|
117
|
-
fi
|
118
|
-
|
119
|
-
local record_artifact=${2:-true}
|
120
|
-
local destination="${CONFIGURATION_BUILD_DIR}"
|
121
|
-
|
122
|
-
if [ -L "${source}" ]; then
|
123
|
-
echo "Symlinked..."
|
124
|
-
source="$(readlink "${source}")"
|
125
|
-
fi
|
126
|
-
|
127
|
-
install_artifact "$source" "$destination" "$record_artifact"
|
128
|
-
|
129
|
-
if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then
|
130
|
-
# Locate and install any .bcsymbolmaps if present
|
131
|
-
find "${source}/${BCSYMBOLMAP_DIR}/" -name "*.bcsymbolmap"|while read f; do
|
132
|
-
install_artifact "$f" "$destination" "true"
|
133
|
-
done
|
134
|
-
fi
|
135
|
-
}
|
136
|
-
|
137
|
-
install_xcframework() {
|
138
|
-
local basepath="$1"
|
139
|
-
local dsym_folder="$2"
|
140
|
-
local embed="$3"
|
141
|
-
shift
|
142
|
-
local paths=("$@")
|
143
|
-
|
144
|
-
# Locate the correct slice of the .xcframework for the current architectures
|
145
|
-
local target_path=""
|
146
|
-
local target_arch="$ARCHS"
|
147
|
-
|
148
|
-
# Replace spaces in compound architectures with _ to match slice format
|
149
|
-
target_arch=${target_arch//\ /_}
|
150
|
-
|
151
|
-
local target_variant=""
|
152
|
-
if [[ "$PLATFORM_NAME" == *"simulator" ]]; then
|
153
|
-
target_variant="simulator"
|
154
|
-
fi
|
155
|
-
if [[ ! -z ${EFFECTIVE_PLATFORM_NAME+x} && "$EFFECTIVE_PLATFORM_NAME" == *"maccatalyst" ]]; then
|
156
|
-
target_variant="maccatalyst"
|
157
|
-
fi
|
158
|
-
for i in ${!paths[@]}; do
|
159
|
-
if [[ "${paths[$i]}" == *"$target_arch"* ]] && [[ "${paths[$i]}" == *"$target_variant"* ]]; then
|
160
|
-
# Found a matching slice
|
161
|
-
echo "Selected xcframework slice ${paths[$i]}"
|
162
|
-
target_path=${paths[$i]}
|
163
|
-
break;
|
164
|
-
fi
|
165
|
-
done
|
166
|
-
|
167
|
-
if [[ -z "$target_path" ]]; then
|
168
|
-
echo "warning: [CP] Unable to find matching .xcframework slice in '${paths[@]}' for the current build architectures ($ARCHS)."
|
169
|
-
return
|
170
|
-
fi
|
171
|
-
|
172
|
-
install_framework "$basepath/$target_path" "$embed"
|
173
|
-
|
174
|
-
if [[ -z "$dsym_folder" || ! -d "$dsym_folder" ]]; then
|
175
|
-
return
|
176
|
-
fi
|
177
|
-
|
178
|
-
dsyms=($(ls "$dsym_folder"))
|
179
|
-
|
180
|
-
local target_dsym=""
|
181
|
-
for i in ${!dsyms[@]}; do
|
182
|
-
install_artifact "$dsym_folder/${dsyms[$i]}" "$CONFIGURATION_BUILD_DIR" "true"
|
183
|
-
done
|
184
|
-
}
|
185
|
-
|
186
|
-
SH
|
187
|
-
contents_by_config = Hash.new do |hash, key|
|
188
|
-
hash[key] = ''
|
189
|
-
end
|
190
|
-
xcframeworks_by_config.each do |config, xcframeworks|
|
191
|
-
next if xcframeworks.empty?
|
192
|
-
xcframeworks.each do |xcframework|
|
193
|
-
slices = xcframework.slices.select { |f| f.platform.symbolic_name == platform.symbolic_name }
|
194
|
-
dynamic_slices, static_slices = slices.partition { |slice| Xcode::LinkageAnalyzer.dynamic_binary?(slice.binary_path) }
|
195
|
-
next if dynamic_slices.empty? && static_slices.empty?
|
196
|
-
unless dynamic_slices.empty?
|
197
|
-
args = install_xcframework_args(xcframework.path, dynamic_slices, false)
|
198
|
-
contents_by_config[config] << %( install_xcframework #{args}\n)
|
199
|
-
end
|
200
|
-
|
201
|
-
unless static_slices.empty?
|
202
|
-
args = install_xcframework_args(xcframework.path, static_slices, true)
|
203
|
-
contents_by_config[config] << %( install_xcframework #{args}\n)
|
204
|
-
end
|
205
|
-
end
|
206
|
-
end
|
207
|
-
|
208
|
-
script << "\n" unless contents_by_config.empty?
|
209
|
-
contents_by_config.keys.sort.each do |config|
|
210
|
-
contents = contents_by_config[config]
|
211
|
-
next if contents.empty?
|
212
|
-
script << %(if [[ "$CONFIGURATION" == "#{config}" ]]; then\n)
|
213
|
-
script << contents
|
214
|
-
script << "fi\n"
|
215
|
-
end
|
216
|
-
|
217
|
-
script << "\necho \"Artifact list stored at $ARTIFACT_LIST_FILE\"\n"
|
218
|
-
script << "\ncat \"$ARTIFACT_LIST_FILE\"\n"
|
219
|
-
script
|
220
|
-
end
|
221
|
-
|
222
|
-
def shell_escape(value)
|
223
|
-
"\"#{value}\""
|
224
|
-
end
|
225
|
-
|
226
|
-
def install_xcframework_args(root, slices, static)
|
227
|
-
args = [shell_escape("${PODS_ROOT}/#{root.relative_path_from(sandbox_root)}")]
|
228
|
-
dsym_folder_arg = if (dsym_folder = PrepareArtifactsScript.dsym_folder(root))
|
229
|
-
shell_escape("${PODS_ROOT}/#{dsym_folder.relative_path_from(sandbox_root)}")
|
230
|
-
else
|
231
|
-
'""'
|
232
|
-
end
|
233
|
-
args << dsym_folder_arg
|
234
|
-
embed = static ? 'false' : 'true'
|
235
|
-
args << shell_escape(embed)
|
236
|
-
slices.each do |slice|
|
237
|
-
args << shell_escape(slice.path.relative_path_from(root))
|
238
|
-
end
|
239
|
-
args.join(' ')
|
240
|
-
end
|
241
|
-
|
242
|
-
class << self
|
243
|
-
# @param [Pathname] xcframework_path
|
244
|
-
# the base path of the .xcframework bundle
|
245
|
-
#
|
246
|
-
# @return [Array<Pathname>] all found .dSYM paths
|
247
|
-
#
|
248
|
-
def dsym_folder(xcframework_path)
|
249
|
-
basename = File.basename(xcframework_path, '.xcframework')
|
250
|
-
dsym_basename = basename + '.dSYMs'
|
251
|
-
path = xcframework_path.dirname + dsym_basename
|
252
|
-
Pathname.new(path) if File.directory?(path)
|
253
|
-
end
|
254
|
-
end
|
255
|
-
end
|
256
|
-
end
|
257
|
-
end
|