cocoapods-binary-cache 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-binary-cache/hooks/pre_install.rb +12 -2
- data/lib/cocoapods-binary-cache/pod-binary/helper/build.rb +27 -29
- data/lib/cocoapods-binary-cache/pod-binary/prebuild.rb +3 -3
- data/lib/cocoapods-binary-cache/pod-rome/xcodebuild_command.rb +158 -152
- data/lib/cocoapods-binary-cache/pod-rome/xcodebuild_raw.rb +39 -33
- data/lib/command/executor/fetcher.rb +2 -0
- data/lib/command/executor/prebuilder.rb +6 -6
- data/lib/command/executor/pusher.rb +2 -0
- data/lib/command/prebuild.rb +4 -0
- 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: 2d362803909e7c1d6490e6e589706882e9b8b3e1a94c58fb496f790f8a8d41a5
|
4
|
+
data.tar.gz: ed54d6a54246ac70cf8b5a55e11d76b407b8e7f75aeaf1dfa863ecd6e15972c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 786d8ae14ca79bd43a4d2a0fda5b56f47bf59d8ba6043855609ad14f8ca18bca5ce5c7f40d121106756bf7cf4882f0b8c158f5f73fffc521c88dcf59f2c81d32
|
7
|
+
data.tar.gz: 7f213efbebb1cf27da7ac2794d154f83abb45ec16ae0b81b8f6a510af8e44101ae1b6b10341ac57c07d7ada16161551a42bd2ebd0e7c8680dff3029739d8cc38
|
@@ -2,13 +2,14 @@ module PodPrebuild
|
|
2
2
|
class PreInstallHook
|
3
3
|
include ObjectSpace
|
4
4
|
|
5
|
-
attr_reader :installer_context, :podfile, :prebuild_sandbox, :cache_validation
|
5
|
+
attr_reader :installer_context, :podfile, :prebuild_sandbox, :standard_sandbox, :cache_validation
|
6
6
|
|
7
7
|
def initialize(installer_context)
|
8
8
|
@installer_context = installer_context
|
9
9
|
@podfile = installer_context.podfile
|
10
10
|
@pod_install_options = {}
|
11
11
|
@prebuild_sandbox = nil
|
12
|
+
@standard_sandbox = installer_context.sandbox
|
12
13
|
@cache_validation = nil
|
13
14
|
end
|
14
15
|
|
@@ -24,6 +25,7 @@ module PodPrebuild
|
|
24
25
|
prebuild! if PodPrebuild.config.prebuild_job?
|
25
26
|
|
26
27
|
PodPrebuild::Env.next_stage!
|
28
|
+
prepare_for_integration
|
27
29
|
log_section "🤖 Resume pod installation"
|
28
30
|
require_relative "../pod-binary/integration"
|
29
31
|
end
|
@@ -51,7 +53,6 @@ module PodPrebuild
|
|
51
53
|
end
|
52
54
|
|
53
55
|
def create_prebuild_sandbox
|
54
|
-
standard_sandbox = installer_context.sandbox
|
55
56
|
@prebuild_sandbox = Pod::PrebuildSandbox.from_standard_sandbox(standard_sandbox)
|
56
57
|
Pod::UI.message "Create prebuild sandbox at #{@prebuild_sandbox.root}"
|
57
58
|
end
|
@@ -102,6 +103,15 @@ module PodPrebuild
|
|
102
103
|
end
|
103
104
|
end
|
104
105
|
|
106
|
+
def prepare_for_integration
|
107
|
+
# Remove local podspec of external sources so that it downloads sources correctly.
|
108
|
+
# Otherwise, with incremental pod installation, CocoaPods downloads the sources
|
109
|
+
# based on the `s.source` declaration in the podspecs which are sometimes incorrect.
|
110
|
+
PodPrebuild.config.prebuilt_pod_names.each do |name|
|
111
|
+
@standard_sandbox.remove_local_podspec(name) if @standard_sandbox.checkout_sources.key?(name)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
105
115
|
def log_section(message)
|
106
116
|
Pod::UI.puts "-----------------------------------------"
|
107
117
|
Pod::UI.puts message
|
@@ -1,39 +1,37 @@
|
|
1
1
|
require_relative "../../pod-rome/xcodebuild_raw"
|
2
2
|
require_relative "../../pod-rome/xcodebuild_command"
|
3
3
|
|
4
|
-
module
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
return if targets.empty?
|
4
|
+
module PodPrebuild
|
5
|
+
def self.build(options)
|
6
|
+
targets = options[:targets] || []
|
7
|
+
return if targets.empty?
|
9
8
|
|
10
|
-
|
11
|
-
|
9
|
+
options[:sandbox] = Pod::Sandbox.new(Pathname(options[:sandbox])) unless options[:sandbox].is_a?(Pod::Sandbox)
|
10
|
+
options[:build_dir] = build_dir(options[:sandbox].root)
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
end
|
27
|
-
raise "The build directory was not found in the expected location" unless options[:build_dir].directory?
|
12
|
+
case targets[0].platform.name
|
13
|
+
when :ios, :tvos, :watchos
|
14
|
+
PodPrebuild::XcodebuildCommand.new(options).run
|
15
|
+
when :osx
|
16
|
+
xcodebuild(
|
17
|
+
sandbox: options[:sandbox],
|
18
|
+
targets: targets,
|
19
|
+
configuration: options[:configuration],
|
20
|
+
sdk: "macosx",
|
21
|
+
args: options[:args]
|
22
|
+
)
|
23
|
+
else
|
24
|
+
raise "Unsupported platform for '#{targets[0].name}': '#{targets[0].platform.name}'"
|
28
25
|
end
|
26
|
+
raise "The build directory was not found in the expected location" unless options[:build_dir].directory?
|
27
|
+
end
|
29
28
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
def self.remove_build_dir(sandbox_root)
|
30
|
+
path = build_dir(sandbox_root)
|
31
|
+
path.rmtree if path.exist?
|
32
|
+
end
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
end
|
34
|
+
def self.build_dir(sandbox_root)
|
35
|
+
sandbox_root.parent + "build"
|
38
36
|
end
|
39
37
|
end
|
@@ -42,8 +42,8 @@ module Pod
|
|
42
42
|
|
43
43
|
run_code_gen!(targets)
|
44
44
|
|
45
|
-
|
46
|
-
|
45
|
+
PodPrebuild.remove_build_dir(sandbox_path)
|
46
|
+
PodPrebuild.build(
|
47
47
|
sandbox: sandbox_path,
|
48
48
|
targets: targets,
|
49
49
|
configuration: PodPrebuild.config.prebuild_config,
|
@@ -53,7 +53,7 @@ module Pod
|
|
53
53
|
disable_dsym: PodPrebuild.config.disable_dsym?,
|
54
54
|
args: PodPrebuild.config.build_args
|
55
55
|
)
|
56
|
-
|
56
|
+
PodPrebuild.remove_build_dir(sandbox_path)
|
57
57
|
|
58
58
|
targets.each do |target|
|
59
59
|
collect_metadata(target, sandbox.framework_folder_path_for_target_name(target.name))
|
@@ -1,189 +1,195 @@
|
|
1
1
|
require_relative "xcodebuild_raw"
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
3
|
+
module PodPrebuild
|
4
|
+
class XcodebuildCommand # rubocop:disable Metrics/ClassLength
|
5
|
+
def initialize(options)
|
6
|
+
@options = options
|
7
|
+
case options[:targets][0].platform.name
|
8
|
+
when :ios
|
9
|
+
@options[:device] = "iphoneos"
|
10
|
+
@options[:simulator] = "iphonesimulator"
|
11
|
+
when :tvos
|
12
|
+
@options[:device] = "appletvos"
|
13
|
+
@options[:simulator] = "appletvsimulator"
|
14
|
+
when :watchos
|
15
|
+
@options[:device] = "watchos"
|
16
|
+
@options[:simulator] = "watchsimulator"
|
17
|
+
end
|
18
|
+
@build_args = make_up_build_args(options[:args] || {})
|
19
|
+
end
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
21
|
+
def run
|
22
|
+
build_for_sdk(simulator) if build_types.include?(:simulator)
|
23
|
+
build_for_sdk(device) if build_types.include?(:device)
|
24
|
+
|
25
|
+
targets.each do |target|
|
26
|
+
case build_types
|
27
|
+
when [:simulator]
|
28
|
+
collect_output(target, Dir[target_products_dir_of(target, simulator) + "/*"])
|
29
|
+
when [:device]
|
30
|
+
collect_output(target, Dir[target_products_dir_of(target, device) + "/*"])
|
31
|
+
else
|
32
|
+
# When merging contents of `simulator` & `device`, prefer contents of `device` over `simulator`
|
33
|
+
# https://github.com/grab/cocoapods-binary-cache/issues/25
|
34
|
+
collect_output(target, Dir[target_products_dir_of(target, device) + "/*"])
|
35
|
+
create_universal_framework(target)
|
36
|
+
end
|
35
37
|
end
|
36
38
|
end
|
37
|
-
end
|
38
39
|
|
39
|
-
|
40
|
+
private
|
40
41
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
42
|
+
def build_types
|
43
|
+
@build_types ||= begin
|
44
|
+
# TODO (thuyen): Add DSL options `build_for_types` to specify build types
|
45
|
+
types = [:simulator]
|
46
|
+
types << :device if device_build_enabled?
|
47
|
+
types
|
48
|
+
end
|
47
49
|
end
|
48
|
-
end
|
49
50
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
51
|
+
def make_up_build_args(args)
|
52
|
+
args_ = args.clone
|
53
|
+
args_[:default] ||= []
|
54
|
+
args_[:simulator] ||= []
|
55
|
+
args_[:device] ||= []
|
56
|
+
args_[:default] += ["BITCODE_GENERATION_MODE=bitcode"] if bitcode_enabled?
|
57
|
+
args_[:default] += ["DEBUG_INFORMATION_FORMAT=dwarf"] if disable_dsym?
|
58
|
+
args_[:simulator] += ["ARCHS=x86_64", "ONLY_ACTIVE_ARCH=NO"] if simulator == "iphonesimulator"
|
59
|
+
args_[:simulator] += args_[:default]
|
60
|
+
args_[:device] += args_[:default]
|
61
|
+
args_
|
62
|
+
end
|
62
63
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
64
|
+
def build_for_sdk(sdk)
|
65
|
+
PodPrebuild::XcodebuildCommand.xcodebuild(
|
66
|
+
sandbox: sandbox,
|
67
|
+
scheme: scheme,
|
68
|
+
targets: targets.map(&:label),
|
69
|
+
configuration: configuration,
|
70
|
+
sdk: sdk,
|
71
|
+
deployment_target: targets.map { |t| t.platform.deployment_target }.max.to_s,
|
72
|
+
args: sdk == simulator ? @build_args[:simulator] : @build_args[:device]
|
73
|
+
)
|
74
|
+
end
|
74
75
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
76
|
+
def create_universal_framework(target)
|
77
|
+
merge_framework_binary(target)
|
78
|
+
merge_framework_dsym(target)
|
79
|
+
merge_swift_headers(target)
|
80
|
+
merge_swift_modules(target)
|
81
|
+
end
|
81
82
|
|
82
|
-
|
83
|
-
|
84
|
-
|
83
|
+
def merge_framework_binary(target)
|
84
|
+
merge_contents(target, "/#{target.product_module_name}", &method(:create_fat_binary))
|
85
|
+
end
|
85
86
|
|
86
|
-
|
87
|
-
|
88
|
-
|
87
|
+
def merge_framework_dsym(target)
|
88
|
+
merge_contents(
|
89
|
+
target,
|
90
|
+
".dSYM/Contents/Resources/DWARF/#{target.product_module_name}",
|
91
|
+
&method(:create_fat_binary)
|
92
|
+
)
|
93
|
+
end
|
89
94
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
95
|
+
def merge_swift_headers(target)
|
96
|
+
merge_contents(target, "/Headers/#{target.product_module_name}-Swift.h") do |options|
|
97
|
+
merged_header = <<~HEREDOC
|
98
|
+
#if TARGET_OS_SIMULATOR // merged by cocoapods-binary
|
99
|
+
#{File.read(options[:simulator])}
|
100
|
+
#else // merged by cocoapods-binary
|
101
|
+
#{File.read(options[:device])}
|
102
|
+
#endif // merged by cocoapods-binary
|
103
|
+
HEREDOC
|
104
|
+
File.write(options[:output], merged_header.strip)
|
105
|
+
end
|
100
106
|
end
|
101
|
-
end
|
102
107
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
+
def merge_swift_modules(target)
|
109
|
+
merge_contents(target, "/Modules/#{target.product_module_name}.swiftmodule") do |options|
|
110
|
+
# Note: swiftmodules of `device` were copied beforehand,
|
111
|
+
# here, we only need to copy swiftmodules of `simulator`
|
112
|
+
FileUtils.cp_r(options[:simulator] + "/.", options[:output])
|
113
|
+
end
|
108
114
|
end
|
109
|
-
end
|
110
115
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
116
|
+
def merge_contents(target, path_suffix, &merger)
|
117
|
+
simulator_, device_, output_ = [
|
118
|
+
framework_path_of(target, simulator),
|
119
|
+
framework_path_of(target, device),
|
120
|
+
"#{output_path(target)}/#{target.product_module_name}.framework"
|
121
|
+
].map { |p| p + path_suffix }
|
122
|
+
return unless File.exist?(simulator_) && File.exist?(device_)
|
118
123
|
|
119
|
-
|
120
|
-
|
124
|
+
merger.call(simulator: simulator_, device: device_, output: output_)
|
125
|
+
end
|
121
126
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
127
|
+
def create_fat_binary(options)
|
128
|
+
cmd = ["lipo", " -create"]
|
129
|
+
cmd << "-output" << options[:output]
|
130
|
+
cmd << options[:simulator] << options[:device]
|
131
|
+
`#{cmd.join(" ")}`
|
132
|
+
end
|
128
133
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
134
|
+
def collect_output(target, paths)
|
135
|
+
FileUtils.mkdir_p(output_path(target))
|
136
|
+
paths = [paths] unless paths.is_a?(Array)
|
137
|
+
paths.each do |path|
|
138
|
+
FileUtils.rm_rf(File.join(output_path(target), File.basename(path)))
|
139
|
+
FileUtils.cp_r(path, output_path(target))
|
140
|
+
end
|
135
141
|
end
|
136
|
-
end
|
137
142
|
|
138
|
-
|
139
|
-
|
140
|
-
|
143
|
+
def target_products_dir_of(target, sdk)
|
144
|
+
"#{build_dir}/#{configuration}-#{sdk}/#{target.name}"
|
145
|
+
end
|
141
146
|
|
142
|
-
|
143
|
-
|
144
|
-
|
147
|
+
def framework_path_of(target, sdk)
|
148
|
+
"#{target_products_dir_of(target, sdk)}/#{target.product_module_name}.framework"
|
149
|
+
end
|
145
150
|
|
146
|
-
|
147
|
-
|
148
|
-
|
151
|
+
def sandbox
|
152
|
+
@options[:sandbox]
|
153
|
+
end
|
149
154
|
|
150
|
-
|
151
|
-
|
152
|
-
|
155
|
+
def build_dir
|
156
|
+
@options[:build_dir]
|
157
|
+
end
|
153
158
|
|
154
|
-
|
155
|
-
|
156
|
-
|
159
|
+
def output_path(target)
|
160
|
+
"#{@options[:output_path]}/#{target.label}"
|
161
|
+
end
|
157
162
|
|
158
|
-
|
159
|
-
|
160
|
-
|
163
|
+
def scheme
|
164
|
+
@options[:scheme]
|
165
|
+
end
|
161
166
|
|
162
|
-
|
163
|
-
|
164
|
-
|
167
|
+
def targets
|
168
|
+
@options[:targets]
|
169
|
+
end
|
165
170
|
|
166
|
-
|
167
|
-
|
168
|
-
|
171
|
+
def configuration
|
172
|
+
@options[:configuration]
|
173
|
+
end
|
169
174
|
|
170
|
-
|
171
|
-
|
172
|
-
|
175
|
+
def bitcode_enabled?
|
176
|
+
@options[:bitcode_enabled]
|
177
|
+
end
|
173
178
|
|
174
|
-
|
175
|
-
|
176
|
-
|
179
|
+
def device_build_enabled?
|
180
|
+
@options[:device_build_enabled]
|
181
|
+
end
|
177
182
|
|
178
|
-
|
179
|
-
|
180
|
-
|
183
|
+
def device
|
184
|
+
@options[:device] || "iphoneos"
|
185
|
+
end
|
181
186
|
|
182
|
-
|
183
|
-
|
184
|
-
|
187
|
+
def simulator
|
188
|
+
@options[:simulator] || "iphonesimulator"
|
189
|
+
end
|
185
190
|
|
186
|
-
|
187
|
-
|
191
|
+
def disable_dsym?
|
192
|
+
@options[:disable_dsym]
|
193
|
+
end
|
188
194
|
end
|
189
195
|
end
|
@@ -1,42 +1,48 @@
|
|
1
1
|
require "fourflusher"
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
module PodPrebuild
|
4
|
+
class XcodebuildCommand
|
5
|
+
PLATFORM_OF_SDK = {
|
6
|
+
"iphonesimulator" => "iOS",
|
7
|
+
"appletvsimulator" => "tvOS",
|
8
|
+
"watchsimulator" => "watchOS"
|
9
|
+
}.freeze
|
8
10
|
|
9
|
-
def xcodebuild(options)
|
10
|
-
|
11
|
-
|
12
|
-
|
11
|
+
def self.xcodebuild(options)
|
12
|
+
sdk = options[:sdk] || "iphonesimulator"
|
13
|
+
targets = options[:targets] || [options[:target]]
|
14
|
+
platform = PLATFORM_OF_SDK[sdk]
|
13
15
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
16
|
+
cmd = ["xcodebuild"]
|
17
|
+
cmd << "-project" << options[:sandbox].project_path.realdirpath
|
18
|
+
targets.each { |target| cmd << "-target" << target }
|
19
|
+
cmd << "-configuration" << options[:configuration]
|
20
|
+
cmd << "-sdk" << sdk
|
21
|
+
unless platform.nil?
|
22
|
+
cmd << Fourflusher::SimControl.new.destination(:oldest, platform, options[:deployment_target])
|
23
|
+
end
|
24
|
+
cmd += options[:args] if options[:args]
|
25
|
+
cmd << "build"
|
26
|
+
cmd << "2>&1"
|
27
|
+
cmd = cmd.join(" ")
|
24
28
|
|
25
|
-
|
26
|
-
|
27
|
-
|
29
|
+
Pod::UI.puts_indented "$ #{cmd}"
|
30
|
+
log = `#{cmd}`
|
31
|
+
return if $?.exitstatus.zero? # rubocop:disable Style/SpecialGlobalVars
|
28
32
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
begin
|
34
|
+
require "xcpretty" # TODO (thuyen): Revise this dependency
|
35
|
+
# use xcpretty to print build log
|
36
|
+
# 64 represent command invalid. http://www.manpagez.com/man/3/sysexits/
|
37
|
+
printer = XCPretty::Printer.new({:formatter => XCPretty::Simple, :colorize => "auto"})
|
38
|
+
log.each_line do |line|
|
39
|
+
printer.pretty_print(line)
|
40
|
+
end
|
41
|
+
rescue
|
42
|
+
Pod::UI.puts log.red
|
43
|
+
ensure
|
44
|
+
raise "Fail to build targets: #{targets}"
|
45
|
+
end
|
36
46
|
end
|
37
|
-
rescue
|
38
|
-
Pod::UI.puts log.red
|
39
|
-
ensure
|
40
|
-
raise "Fail to build targets: #{targets}"
|
41
47
|
end
|
42
48
|
end
|
@@ -4,23 +4,23 @@ require_relative "pusher"
|
|
4
4
|
|
5
5
|
module PodPrebuild
|
6
6
|
class CachePrebuilder < CommandExecutor
|
7
|
+
attr_reader :repo_update, :fetcher, :pusher
|
8
|
+
|
7
9
|
def initialize(options)
|
8
10
|
super(options)
|
9
|
-
@cache_branch = options[:cache_branch]
|
10
|
-
@push_cache = options[:push_cache]
|
11
11
|
@repo_update = options[:repo_update]
|
12
|
-
@fetcher = PodPrebuild::CacheFetcher.new(options)
|
13
|
-
@pusher = PodPrebuild::CachePusher.new(options)
|
12
|
+
@fetcher = PodPrebuild::CacheFetcher.new(options) unless options[:no_fetch]
|
13
|
+
@pusher = PodPrebuild::CachePusher.new(options) if options[:push_cache]
|
14
14
|
end
|
15
15
|
|
16
16
|
def run
|
17
|
-
@fetcher
|
17
|
+
@fetcher&.run
|
18
18
|
prebuild
|
19
19
|
changes = PodPrebuild::JSONFile.new(@config.prebuild_delta_path)
|
20
20
|
return if changes.empty?
|
21
21
|
|
22
22
|
sync_cache(changes)
|
23
|
-
@pusher
|
23
|
+
@pusher&.run
|
24
24
|
end
|
25
25
|
|
26
26
|
private
|
data/lib/command/prebuild.rb
CHANGED
@@ -5,11 +5,14 @@ module Pod
|
|
5
5
|
class Command
|
6
6
|
class Binary < Command
|
7
7
|
class Prebuild < Binary
|
8
|
+
attr_reader :prebuilder
|
9
|
+
|
8
10
|
self.arguments = [CLAide::Argument.new("CACHE-BRANCH", false)]
|
9
11
|
def self.options
|
10
12
|
[
|
11
13
|
["--config", "Config (Debug, Test...) to prebuild"],
|
12
14
|
["--repo-update", "Update pod repo before installing"],
|
15
|
+
["--no-fetch", "Do not perform a cache fetch beforehand"],
|
13
16
|
["--push", "Push cache to repo upon completion"],
|
14
17
|
["--all", "Prebuild all binary pods regardless of cache validation"],
|
15
18
|
["--targets", "Targets to prebuild. Use comma (,) to specify a list of targets"]
|
@@ -30,6 +33,7 @@ module Pod
|
|
30
33
|
config: prebuild_config,
|
31
34
|
cache_branch: argv.shift_argument || "master",
|
32
35
|
repo_update: argv.flag?("repo-update"),
|
36
|
+
no_fetch: argv.flag?("fetch") == false,
|
33
37
|
push_cache: argv.flag?("push")
|
34
38
|
)
|
35
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-binary-cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bang Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|