pod-builder 0.3.4 ā 0.3.5
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/exe/pod_builder +16 -14
- data/lib/pod_builder/command/build.rb +2 -2
- data/lib/pod_builder/command/clean.rb +1 -1
- data/lib/pod_builder/command/deintegrate.rb +1 -1
- data/lib/pod_builder/command/generate_lfs.rb +3 -1
- data/lib/pod_builder/command/generate_podspec.rb +1 -1
- data/lib/pod_builder/command/init.rb +1 -1
- data/lib/pod_builder/command/install_sources.rb +1 -1
- data/lib/pod_builder/command/none.rb +2 -2
- data/lib/pod_builder/command/restore_all.rb +3 -4
- data/lib/pod_builder/command/switch.rb +4 -3
- data/lib/pod_builder/command/sync_podfile.rb +1 -1
- data/lib/pod_builder/command/update.rb +7 -2
- data/lib/pod_builder/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: 4cd79078e29962f8d13a9a306462aaa99a0a0bfccc86cf401bba8fe0f39547bf
|
4
|
+
data.tar.gz: 211898086a3b86013c16c3281e9170adac80fd95165c081076424b74cecea63d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95b42aaef813c53f251a1fc80b9321302b6d8d64bcd90be2ff5215a32e252f041aaa60f774228f296a27d356a5a0022f29522e6a1d7dbb4508991195237111fb
|
7
|
+
data.tar.gz: 4375249f5461a9da244c828e8d2b1fa2e04c7e5ccc49c0d177c5a2ea4b72ad7259e573e52ecaa57af58ec1b5745b2618badfa10ab5252b55b4fc960db3744a57
|
data/exe/pod_builder
CHANGED
@@ -119,6 +119,9 @@ Options:
|
|
119
119
|
opts.on("-w", "--allow-warnings", "Allow warnings") do |o|
|
120
120
|
OPTIONS[:allow_warnings] = o
|
121
121
|
end
|
122
|
+
opts.on("-r", "--dry", "Determine which frameworks need update") do |o|
|
123
|
+
OPTIONS[:dry_run] = o
|
124
|
+
end
|
122
125
|
opts.on("-d", "--debug", "Don't clean build folder") do |o|
|
123
126
|
OPTIONS[:debug] = o
|
124
127
|
end
|
@@ -286,6 +289,7 @@ Usage:
|
|
286
289
|
|
287
290
|
subcommand = subcommands[ARGV.shift]
|
288
291
|
|
292
|
+
ret = -1
|
289
293
|
if subcommand
|
290
294
|
if ARGV.include?("--help") || ARGV.include?("-h")
|
291
295
|
puts subcommand[:opts].help
|
@@ -294,29 +298,27 @@ Usage:
|
|
294
298
|
|
295
299
|
subcommand[:opts].order!
|
296
300
|
subcommand[:call].each do |k|
|
297
|
-
if
|
301
|
+
if (ret = k.call(OPTIONS)) && ret == -1
|
298
302
|
puts subcommand[:opts].help
|
299
303
|
end
|
300
304
|
end
|
301
|
-
end
|
302
|
-
|
303
|
-
return true
|
305
|
+
end
|
304
306
|
else
|
305
307
|
if !subcommands["none"][:call].first&.call(OPTIONS)
|
306
308
|
puts subcommands["none"][:opts].help
|
307
309
|
end
|
308
|
-
|
309
|
-
return false
|
310
310
|
end
|
311
|
+
|
312
|
+
return ret
|
311
313
|
end
|
312
314
|
|
313
|
-
|
315
|
+
command_ret = -1
|
314
316
|
begin
|
315
317
|
unless ENV['USER'] != "root"
|
316
318
|
raise "\n\nFor safety do not run this as root\n".red
|
317
319
|
end
|
318
320
|
|
319
|
-
|
321
|
+
command_ret = parse_commandline
|
320
322
|
rescue Exception => e
|
321
323
|
error = e.to_s
|
322
324
|
|
@@ -330,12 +332,12 @@ rescue Exception => e
|
|
330
332
|
File.write(error_log, error)
|
331
333
|
end
|
332
334
|
ensure
|
333
|
-
|
334
|
-
|
335
|
+
if command_ret == 0
|
336
|
+
PodBuilder::clean_basepath
|
337
|
+
if !OPTIONS.has_key?(:debug)
|
338
|
+
PodBuilder::safe_rm_rf(PodBuilder::Configuration.build_path)
|
339
|
+
end
|
335
340
|
end
|
336
341
|
|
337
|
-
|
338
|
-
if !OPTIONS.has_key?(:debug)
|
339
|
-
PodBuilder::safe_rm_rf(PodBuilder::Configuration.build_path)
|
340
|
-
end
|
342
|
+
exit(command_ret)
|
341
343
|
end
|
@@ -10,7 +10,7 @@ module PodBuilder
|
|
10
10
|
argument_pods = ARGV.dup
|
11
11
|
|
12
12
|
unless argument_pods.count > 0
|
13
|
-
return
|
13
|
+
return -1
|
14
14
|
end
|
15
15
|
|
16
16
|
Podfile.sanity_check()
|
@@ -100,7 +100,7 @@ module PodBuilder
|
|
100
100
|
end
|
101
101
|
|
102
102
|
puts "\n\nš done!\n".green
|
103
|
-
return
|
103
|
+
return 0
|
104
104
|
end
|
105
105
|
|
106
106
|
private
|
@@ -7,7 +7,7 @@ module PodBuilder
|
|
7
7
|
Configuration.check_inited
|
8
8
|
|
9
9
|
unless Configuration.lfs_update_gitattributes
|
10
|
-
return
|
10
|
+
return -1
|
11
11
|
end
|
12
12
|
|
13
13
|
gitattributes_excludes = ["*.h", "*.hh", "*.m", "*.mm", "*.i", "*.c", "*.cc", "*.cxx", "*.cpp", "*.def", "*.inc", "*.inl", "*.swift", "*.modulemap", "*.strings", "*.png", "*.jpg", "*.gif", "*.html", "*.htm", "*.js", "*.json", "*.xml", "*.txt", "*.md", "*.rb", "*.sh", "*.py", "*.plist", "*.resolved", ".*", "README*", "LICENSE*"]
|
@@ -20,6 +20,8 @@ module PodBuilder
|
|
20
20
|
gitattributes_includes_pods = ["**/*.framework/**/* filter=lfs diff=lfs merge=lfs !text"]
|
21
21
|
write_attributes(PodBuilder::project_path("Pods"), gitattributes_includes_pods, gitattributes_excludes)
|
22
22
|
end
|
23
|
+
|
24
|
+
return 0
|
23
25
|
end
|
24
26
|
|
25
27
|
private
|
@@ -5,20 +5,19 @@ module PodBuilder
|
|
5
5
|
class RestoreAll
|
6
6
|
def self.call(options)
|
7
7
|
unless Configuration.restore_enabled
|
8
|
-
|
8
|
+
raise "Restore not enabled!".red
|
9
9
|
end
|
10
10
|
|
11
11
|
Configuration.check_inited
|
12
12
|
PodBuilder::prepare_basepath
|
13
13
|
|
14
|
-
ret = false
|
15
14
|
begin
|
16
15
|
File.rename(PodBuilder::basepath("Podfile"), PodBuilder::basepath("Podfile.tmp2"))
|
17
16
|
File.rename(PodBuilder::basepath("Podfile.restore"), PodBuilder::basepath("Podfile"))
|
18
17
|
|
19
18
|
ARGV << "*"
|
20
19
|
options[:skip_prebuild_update] = true
|
21
|
-
|
20
|
+
return Command::Build::call(options)
|
22
21
|
rescue Exception => e
|
23
22
|
raise e
|
24
23
|
ensure
|
@@ -27,7 +26,7 @@ module PodBuilder
|
|
27
26
|
File.rename(PodBuilder::basepath("Podfile.tmp2"), PodBuilder::basepath("Podfile"))
|
28
27
|
end
|
29
28
|
|
30
|
-
return
|
29
|
+
return -1
|
31
30
|
end
|
32
31
|
end
|
33
32
|
end
|
@@ -10,11 +10,10 @@ module PodBuilder
|
|
10
10
|
argument_pods = ARGV.dup
|
11
11
|
|
12
12
|
unless argument_pods.count > 0
|
13
|
-
return
|
13
|
+
return -1
|
14
14
|
end
|
15
15
|
unless argument_pods.count == 1
|
16
16
|
raise "\n\nSpecify a single pod to switch\n\n".red
|
17
|
-
return false
|
18
17
|
end
|
19
18
|
|
20
19
|
pod_name_to_switch = argument_pods.first
|
@@ -31,7 +30,7 @@ module PodBuilder
|
|
31
30
|
options[:switch_mode] = request_switch_mode(pod_name_to_switch, podfile_item)
|
32
31
|
|
33
32
|
if options[:switch_mode].nil?
|
34
|
-
return
|
33
|
+
return 0
|
35
34
|
end
|
36
35
|
end
|
37
36
|
|
@@ -101,6 +100,8 @@ module PodBuilder
|
|
101
100
|
|
102
101
|
Dir.chdir(PodBuilder::project_path)
|
103
102
|
system("pod install")
|
103
|
+
|
104
|
+
return 0
|
104
105
|
end
|
105
106
|
|
106
107
|
private
|
@@ -48,7 +48,12 @@ module PodBuilder
|
|
48
48
|
|
49
49
|
unless pod_entries.count > 0
|
50
50
|
puts "Frameworks in sync!\n".green
|
51
|
-
return
|
51
|
+
return 0
|
52
|
+
end
|
53
|
+
if options.has_key?(:dry_run)
|
54
|
+
rebuilding_pods = pod_entries.map { |x| x.match(/(^pod')(.*?)(')/)[2] }.compact
|
55
|
+
puts "`#{rebuilding_pods.join("`, `")}` need to be rebuilt!\n".red
|
56
|
+
return -2
|
52
57
|
end
|
53
58
|
|
54
59
|
ARGV.clear
|
@@ -59,7 +64,7 @@ module PodBuilder
|
|
59
64
|
}
|
60
65
|
|
61
66
|
options[:auto_resolve_dependencies] = true
|
62
|
-
PodBuilder::Command::Build.call(options)
|
67
|
+
return PodBuilder::Command::Build.call(options)
|
63
68
|
end
|
64
69
|
|
65
70
|
private
|
data/lib/pod_builder/version.rb
CHANGED