branch_io_cli 0.12.10 → 0.13.0.pre.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 +4 -4
- data/README.md +32 -47
- data/lib/assets/completions/completion.bash +1 -1
- data/lib/assets/completions/completion.zsh +1 -1
- data/lib/assets/templates/completion.zsh.erb +1 -1
- data/lib/assets/templates/validate_description.erb +20 -10
- data/lib/branch_io_cli.rb +1 -0
- data/lib/branch_io_cli/branch_app.rb +70 -0
- data/lib/branch_io_cli/command/report_command.rb +6 -2
- data/lib/branch_io_cli/command/setup_command.rb +1 -9
- data/lib/branch_io_cli/command/validate_command.rb +74 -9
- data/lib/branch_io_cli/configuration/configuration.rb +55 -0
- data/lib/branch_io_cli/configuration/option.rb +11 -0
- data/lib/branch_io_cli/configuration/report_configuration.rb +1 -5
- data/lib/branch_io_cli/configuration/report_options.rb +1 -7
- data/lib/branch_io_cli/configuration/setup_configuration.rb +6 -36
- data/lib/branch_io_cli/configuration/setup_options.rb +1 -7
- data/lib/branch_io_cli/configuration/validate_configuration.rb +4 -0
- data/lib/branch_io_cli/configuration/validate_options.rb +22 -3
- data/lib/branch_io_cli/core_ext/xcodeproj.rb +6 -4
- data/lib/branch_io_cli/helper/branch_helper.rb +8 -0
- data/lib/branch_io_cli/helper/ios_helper.rb +107 -5
- data/lib/branch_io_cli/helper/report_helper.rb +0 -64
- data/lib/branch_io_cli/helper/tool_helper.rb +78 -13
- data/lib/branch_io_cli/rake_task.rb +4 -2
- data/lib/branch_io_cli/version.rb +1 -1
- metadata +61 -66
@@ -213,70 +213,6 @@ module BranchIOCLI
|
|
213
213
|
|
214
214
|
report
|
215
215
|
end
|
216
|
-
|
217
|
-
def pod_install_if_required(report)
|
218
|
-
return unless config.pod_install_required?
|
219
|
-
# Only if a Podfile is detected/supplied at the command line.
|
220
|
-
|
221
|
-
say "pod install required in order to build."
|
222
|
-
if config.confirm
|
223
|
-
install = confirm 'Run "pod install" now?', true
|
224
|
-
|
225
|
-
unless install
|
226
|
-
say 'Please run "pod install" or "pod update" first in order to continue.'
|
227
|
-
exit(-1)
|
228
|
-
end
|
229
|
-
end
|
230
|
-
|
231
|
-
ToolHelper.verify_cocoapods
|
232
|
-
|
233
|
-
install_command = "pod install"
|
234
|
-
|
235
|
-
if config.pod_repo_update
|
236
|
-
install_command += " --repo-update"
|
237
|
-
else
|
238
|
-
say <<-EOF
|
239
|
-
You have disabled "pod repo update". This can cause "pod install" to fail in
|
240
|
-
some cases. If that happens, please rerun without --no-pod-repo-update or run
|
241
|
-
"pod install --repo-update" manually.
|
242
|
-
EOF
|
243
|
-
end
|
244
|
-
|
245
|
-
say "Running #{install_command.inspect}"
|
246
|
-
if report.sh(install_command).success?
|
247
|
-
say "Done ✅"
|
248
|
-
else
|
249
|
-
say "#{install_command.inspect} failed. See report for details."
|
250
|
-
exit(-1)
|
251
|
-
end
|
252
|
-
end
|
253
|
-
|
254
|
-
def carthage_bootstrap_if_required(report)
|
255
|
-
return unless config.cartfile_path
|
256
|
-
return if Dir.exist?(File.join(File.dirname(config.cartfile_path), "Carthage", "Build", "iOS"))
|
257
|
-
|
258
|
-
say "carthage checkout required in order to build."
|
259
|
-
if config.confirm
|
260
|
-
install = confirm 'Run "carthage checkout && carthage build --platform ios" now?', true
|
261
|
-
|
262
|
-
unless install
|
263
|
-
say 'Please build your Carthage dependencies first in order to continue.'
|
264
|
-
exit(-1)
|
265
|
-
end
|
266
|
-
end
|
267
|
-
|
268
|
-
ToolHelper.verify_carthage
|
269
|
-
|
270
|
-
install_command = "carthage checkout && carthage build --platform ios"
|
271
|
-
|
272
|
-
say "Running #{install_command.inspect}"
|
273
|
-
if report.sh(install_command).success?
|
274
|
-
say "Done ✅"
|
275
|
-
else
|
276
|
-
say "#{install_command.inspect} failed. See report for details."
|
277
|
-
exit(-1)
|
278
|
-
end
|
279
|
-
end
|
280
216
|
end
|
281
217
|
end
|
282
218
|
end
|
@@ -257,31 +257,28 @@ github "BranchMetrics/ios-branch-deep-linking"
|
|
257
257
|
true
|
258
258
|
end
|
259
259
|
|
260
|
-
def install_cmd
|
261
|
-
ENV["BRANCH_IO_CLI_INSTALLED_FROM_HOMEBREW"] == "true" ? :brew : :gem
|
262
|
-
end
|
263
|
-
|
264
260
|
def verify_cocoapods
|
265
261
|
pod_cmd = `which pod`
|
266
262
|
return unless pod_cmd.empty?
|
267
263
|
|
268
|
-
|
269
|
-
if
|
270
|
-
say "'pod' command not available in PATH and '
|
264
|
+
gem_cmd = `which gem`
|
265
|
+
if gem_cmd.empty?
|
266
|
+
say "'pod' command not available in PATH and 'gem' command not available in PATH to install cocoapods."
|
271
267
|
exit(-1)
|
272
268
|
end
|
273
269
|
|
274
|
-
|
275
|
-
sudo_warning = sudo.blank? ? "" : " (requires a sudo password)"
|
276
|
-
|
277
|
-
install = confirm "'pod' command not available in PATH. Install cocoapods#{sudo_warning}?", true
|
270
|
+
install = confirm "'pod' command not available in PATH. Install cocoapods (may require a sudo password)?", true
|
278
271
|
unless install
|
279
|
-
# TODO: There are times that --no-add-sdk is not available or doesn't avoid the need.
|
280
272
|
say "Please install cocoapods or use --no-add-sdk to continue."
|
281
273
|
exit(-1)
|
282
274
|
end
|
283
275
|
|
284
|
-
|
276
|
+
gem_home = Gem.dir
|
277
|
+
if gem_home && File.writable?(gem_home)
|
278
|
+
sh "gem install cocoapods"
|
279
|
+
else
|
280
|
+
sh "sudo gem install cocoapods"
|
281
|
+
end
|
285
282
|
|
286
283
|
# Ensure master podspec repo is set up (will update if it exists).
|
287
284
|
sh "pod setup"
|
@@ -326,6 +323,74 @@ github "BranchMetrics/ios-branch-deep-linking"
|
|
326
323
|
|
327
324
|
sh "xcode-select --install"
|
328
325
|
end
|
326
|
+
|
327
|
+
def pod_install_if_required(report = STDOUT)
|
328
|
+
return true unless config.pod_install_required?
|
329
|
+
# Only if a Podfile is detected/supplied at the command line.
|
330
|
+
|
331
|
+
say "pod install required in order to build."
|
332
|
+
if config.confirm
|
333
|
+
install = confirm 'Run "pod install" now?', true
|
334
|
+
|
335
|
+
unless install
|
336
|
+
say 'Please run "pod install" or "pod update" first in order to continue.'
|
337
|
+
return false
|
338
|
+
end
|
339
|
+
end
|
340
|
+
|
341
|
+
verify_cocoapods
|
342
|
+
|
343
|
+
install_command = "pod install"
|
344
|
+
|
345
|
+
if config.pod_repo_update
|
346
|
+
install_command += " --repo-update"
|
347
|
+
else
|
348
|
+
say <<-EOF
|
349
|
+
You have disabled "pod repo update". This can cause "pod install" to fail in
|
350
|
+
some cases. If that happens, please rerun without --no-pod-repo-update or run
|
351
|
+
"pod install --repo-update" manually.
|
352
|
+
EOF
|
353
|
+
end
|
354
|
+
|
355
|
+
say "Running #{install_command.inspect}"
|
356
|
+
if report.sh(install_command).success?
|
357
|
+
say "Done ✅"
|
358
|
+
else
|
359
|
+
say "#{install_command.inspect} failed. See report for details."
|
360
|
+
return false
|
361
|
+
end
|
362
|
+
|
363
|
+
true
|
364
|
+
end
|
365
|
+
|
366
|
+
def carthage_bootstrap_if_required(report = STDOUT)
|
367
|
+
return true unless config.cartfile_path
|
368
|
+
return true if Dir.exist?(File.join(File.dirname(config.cartfile_path), "Carthage", "Build", "iOS"))
|
369
|
+
|
370
|
+
say "carthage checkout required in order to build."
|
371
|
+
if config.confirm
|
372
|
+
install = confirm 'Run "carthage checkout && carthage build --platform ios" now?', true
|
373
|
+
|
374
|
+
unless install
|
375
|
+
say 'Please build your Carthage dependencies first in order to continue.'
|
376
|
+
return false
|
377
|
+
end
|
378
|
+
end
|
379
|
+
|
380
|
+
verify_carthage
|
381
|
+
|
382
|
+
install_command = "carthage checkout && carthage build --platform ios"
|
383
|
+
|
384
|
+
say "Running #{install_command.inspect}"
|
385
|
+
if report.sh(install_command).success?
|
386
|
+
say "Done ✅"
|
387
|
+
else
|
388
|
+
say "#{install_command.inspect} failed. See report for details."
|
389
|
+
return false
|
390
|
+
end
|
391
|
+
|
392
|
+
true
|
393
|
+
end
|
329
394
|
end
|
330
395
|
end
|
331
396
|
end
|
@@ -11,7 +11,7 @@ module BranchIOCLI
|
|
11
11
|
namespace name do
|
12
12
|
add_branch_task :report, "Generate a brief Branch report"
|
13
13
|
add_branch_task :setup, "Set a project up with the Branch SDK"
|
14
|
-
add_branch_task :validate, "Validate
|
14
|
+
add_branch_task :validate, "Validate Universal Links in one or more projects"
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -23,13 +23,15 @@ module BranchIOCLI
|
|
23
23
|
task task_name, %i{paths options} do |task, args|
|
24
24
|
paths = args[:paths]
|
25
25
|
paths = [paths] unless paths.respond_to?(:each)
|
26
|
+
options = args[:options] || {}
|
26
27
|
|
27
28
|
paths.each do |path|
|
28
29
|
Dir.chdir(path) do
|
29
30
|
begin
|
30
|
-
command_class.new(configuration_class.wrapper(
|
31
|
+
command_class.new(configuration_class.wrapper(options)).run!
|
31
32
|
rescue StandardError => e
|
32
33
|
say "Error from #{task_name} task in #{path}: #{e.message}"
|
34
|
+
say e.backtrace if options[:trace]
|
33
35
|
end
|
34
36
|
end
|
35
37
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: branch_io_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0.pre.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Branch
|
@@ -9,50 +9,50 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-12-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: CFPropertyList
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
20
|
+
version: '0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
27
|
+
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: cocoapods-core
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
41
|
+
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: commander
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - "
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
48
|
+
version: '0'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - "
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
55
|
+
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: pattern_patch
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,9 +60,6 @@ dependencies:
|
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: 0.5.4
|
63
|
-
- - "~>"
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
version: '0.5'
|
66
63
|
type: :runtime
|
67
64
|
prerelease: false
|
68
65
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -70,149 +67,146 @@ dependencies:
|
|
70
67
|
- - ">="
|
71
68
|
- !ruby/object:Gem::Version
|
72
69
|
version: 0.5.4
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0.5'
|
76
70
|
- !ruby/object:Gem::Dependency
|
77
71
|
name: plist
|
78
72
|
requirement: !ruby/object:Gem::Requirement
|
79
73
|
requirements:
|
80
|
-
- - "
|
74
|
+
- - ">="
|
81
75
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
76
|
+
version: '0'
|
83
77
|
type: :runtime
|
84
78
|
prerelease: false
|
85
79
|
version_requirements: !ruby/object:Gem::Requirement
|
86
80
|
requirements:
|
87
|
-
- - "
|
81
|
+
- - ">="
|
88
82
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
83
|
+
version: '0'
|
90
84
|
- !ruby/object:Gem::Dependency
|
91
85
|
name: rubyzip
|
92
86
|
requirement: !ruby/object:Gem::Requirement
|
93
87
|
requirements:
|
94
|
-
- - "
|
88
|
+
- - ">="
|
95
89
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
90
|
+
version: '0'
|
97
91
|
type: :runtime
|
98
92
|
prerelease: false
|
99
93
|
version_requirements: !ruby/object:Gem::Requirement
|
100
94
|
requirements:
|
101
|
-
- - "
|
95
|
+
- - ">="
|
102
96
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
97
|
+
version: '0'
|
104
98
|
- !ruby/object:Gem::Dependency
|
105
99
|
name: xcodeproj
|
106
100
|
requirement: !ruby/object:Gem::Requirement
|
107
101
|
requirements:
|
108
|
-
- - "
|
102
|
+
- - ">="
|
109
103
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
104
|
+
version: '0'
|
111
105
|
type: :runtime
|
112
106
|
prerelease: false
|
113
107
|
version_requirements: !ruby/object:Gem::Requirement
|
114
108
|
requirements:
|
115
|
-
- - "
|
109
|
+
- - ">="
|
116
110
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
111
|
+
version: '0'
|
118
112
|
- !ruby/object:Gem::Dependency
|
119
113
|
name: bundler
|
120
114
|
requirement: !ruby/object:Gem::Requirement
|
121
115
|
requirements:
|
122
|
-
- - "
|
116
|
+
- - ">="
|
123
117
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
118
|
+
version: '0'
|
125
119
|
type: :development
|
126
120
|
prerelease: false
|
127
121
|
version_requirements: !ruby/object:Gem::Requirement
|
128
122
|
requirements:
|
129
|
-
- - "
|
123
|
+
- - ">="
|
130
124
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
125
|
+
version: '0'
|
132
126
|
- !ruby/object:Gem::Dependency
|
133
127
|
name: cocoapods
|
134
128
|
requirement: !ruby/object:Gem::Requirement
|
135
129
|
requirements:
|
136
|
-
- - "
|
130
|
+
- - ">="
|
137
131
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
132
|
+
version: '0'
|
139
133
|
type: :development
|
140
134
|
prerelease: false
|
141
135
|
version_requirements: !ruby/object:Gem::Requirement
|
142
136
|
requirements:
|
143
|
-
- - "
|
137
|
+
- - ">="
|
144
138
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
139
|
+
version: '0'
|
146
140
|
- !ruby/object:Gem::Dependency
|
147
141
|
name: pry
|
148
142
|
requirement: !ruby/object:Gem::Requirement
|
149
143
|
requirements:
|
150
|
-
- - "
|
144
|
+
- - ">="
|
151
145
|
- !ruby/object:Gem::Version
|
152
|
-
version: '0
|
146
|
+
version: '0'
|
153
147
|
type: :development
|
154
148
|
prerelease: false
|
155
149
|
version_requirements: !ruby/object:Gem::Requirement
|
156
150
|
requirements:
|
157
|
-
- - "
|
151
|
+
- - ">="
|
158
152
|
- !ruby/object:Gem::Version
|
159
|
-
version: '0
|
153
|
+
version: '0'
|
160
154
|
- !ruby/object:Gem::Dependency
|
161
155
|
name: rake
|
162
156
|
requirement: !ruby/object:Gem::Requirement
|
163
157
|
requirements:
|
164
|
-
- - "
|
158
|
+
- - ">="
|
165
159
|
- !ruby/object:Gem::Version
|
166
|
-
version: '
|
160
|
+
version: '0'
|
167
161
|
type: :development
|
168
162
|
prerelease: false
|
169
163
|
version_requirements: !ruby/object:Gem::Requirement
|
170
164
|
requirements:
|
171
|
-
- - "
|
165
|
+
- - ">="
|
172
166
|
- !ruby/object:Gem::Version
|
173
|
-
version: '
|
167
|
+
version: '0'
|
174
168
|
- !ruby/object:Gem::Dependency
|
175
169
|
name: rspec
|
176
170
|
requirement: !ruby/object:Gem::Requirement
|
177
171
|
requirements:
|
178
|
-
- - "
|
172
|
+
- - ">="
|
179
173
|
- !ruby/object:Gem::Version
|
180
|
-
version: '
|
174
|
+
version: '0'
|
181
175
|
type: :development
|
182
176
|
prerelease: false
|
183
177
|
version_requirements: !ruby/object:Gem::Requirement
|
184
178
|
requirements:
|
185
|
-
- - "
|
179
|
+
- - ">="
|
186
180
|
- !ruby/object:Gem::Version
|
187
|
-
version: '
|
181
|
+
version: '0'
|
188
182
|
- !ruby/object:Gem::Dependency
|
189
183
|
name: rspec-simplecov
|
190
184
|
requirement: !ruby/object:Gem::Requirement
|
191
185
|
requirements:
|
192
|
-
- - "
|
186
|
+
- - ">="
|
193
187
|
- !ruby/object:Gem::Version
|
194
|
-
version: '0
|
188
|
+
version: '0'
|
195
189
|
type: :development
|
196
190
|
prerelease: false
|
197
191
|
version_requirements: !ruby/object:Gem::Requirement
|
198
192
|
requirements:
|
199
|
-
- - "
|
193
|
+
- - ">="
|
200
194
|
- !ruby/object:Gem::Version
|
201
|
-
version: '0
|
195
|
+
version: '0'
|
202
196
|
- !ruby/object:Gem::Dependency
|
203
197
|
name: rspec_junit_formatter
|
204
198
|
requirement: !ruby/object:Gem::Requirement
|
205
199
|
requirements:
|
206
|
-
- - "
|
200
|
+
- - ">="
|
207
201
|
- !ruby/object:Gem::Version
|
208
|
-
version: '0
|
202
|
+
version: '0'
|
209
203
|
type: :development
|
210
204
|
prerelease: false
|
211
205
|
version_requirements: !ruby/object:Gem::Requirement
|
212
206
|
requirements:
|
213
|
-
- - "
|
207
|
+
- - ">="
|
214
208
|
- !ruby/object:Gem::Version
|
215
|
-
version: '0
|
209
|
+
version: '0'
|
216
210
|
- !ruby/object:Gem::Dependency
|
217
211
|
name: rubocop
|
218
212
|
requirement: !ruby/object:Gem::Requirement
|
@@ -231,16 +225,16 @@ dependencies:
|
|
231
225
|
name: simplecov
|
232
226
|
requirement: !ruby/object:Gem::Requirement
|
233
227
|
requirements:
|
234
|
-
- - "
|
228
|
+
- - ">="
|
235
229
|
- !ruby/object:Gem::Version
|
236
|
-
version: '0
|
230
|
+
version: '0'
|
237
231
|
type: :development
|
238
232
|
prerelease: false
|
239
233
|
version_requirements: !ruby/object:Gem::Requirement
|
240
234
|
requirements:
|
241
|
-
- - "
|
235
|
+
- - ">="
|
242
236
|
- !ruby/object:Gem::Version
|
243
|
-
version: '0
|
237
|
+
version: '0'
|
244
238
|
description: Set up mobile app projects (currently iOS only) to use the Branch SDK
|
245
239
|
without opening Xcode. Validate the Universal Link settings for any project.
|
246
240
|
email:
|
@@ -305,6 +299,7 @@ files:
|
|
305
299
|
- lib/assets/templates/validate_description.erb
|
306
300
|
- lib/branch_io_cli.rb
|
307
301
|
- lib/branch_io_cli/ascii_art.rb
|
302
|
+
- lib/branch_io_cli/branch_app.rb
|
308
303
|
- lib/branch_io_cli/cli.rb
|
309
304
|
- lib/branch_io_cli/command.rb
|
310
305
|
- lib/branch_io_cli/command/command.rb
|
@@ -356,9 +351,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
356
351
|
version: 2.0.0
|
357
352
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
358
353
|
requirements:
|
359
|
-
- - "
|
354
|
+
- - ">"
|
360
355
|
- !ruby/object:Gem::Version
|
361
|
-
version:
|
356
|
+
version: 1.3.1
|
362
357
|
requirements: []
|
363
358
|
rubyforge_project:
|
364
359
|
rubygems_version: 2.7.4
|