cocoapods-xccache 0.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 325cc87a11da8b5f06044214944c22c20c67545678982c517c178fb8da6f0441
4
+ data.tar.gz: 59f1d145671817b473fcbde7b6a9686d9ad8dfef99a7435f267d896a36e6bf25
5
+ SHA512:
6
+ metadata.gz: eaf3002c35757de8f074d248b48a9bb82171c9db2a158b429fa613cfe4a65b3106661bac1455a18db9cc76821cf3cf250547a278c602e27974363a3d39bf4d63
7
+ data.tar.gz: 1ceebcf23b418e6ce7bd8ff21bb982840fec18df645bc42c4f7d9eda017b7cf7dd5b0297a56f65fb2dff1d914b5499c1ee12cd8ee01be0aed8a1dc54acf0f70a
@@ -0,0 +1,60 @@
1
+ module Pod
2
+ class Command
3
+ # This is an example of a cocoapods plugin adding a top-level subcommand
4
+ # to the 'pod' command.
5
+ #
6
+ # You can also create subcommands of existing or new commands. Say you
7
+ # wanted to add a subcommand to `list` to show newly deprecated pods,
8
+ # (e.g. `pod list deprecated`), there are a few things that would need
9
+ # to change.
10
+ #
11
+ # - move this file to `lib/pod/command/list/deprecated.rb` and update
12
+ # the class to exist in the the Pod::Command::List namespace
13
+ # - change this class to extend from `List` instead of `Command`. This
14
+ # tells the plugin system that it is a subcommand of `list`.
15
+ # - edit `lib/cocoapods_plugins.rb` to require this file
16
+ #
17
+ # @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
18
+ # in the `plugins.json` file, once your plugin is released.
19
+ #
20
+ class Xccache < Command
21
+ self.summary = '基于Xcode cache的缓存插件之缓存'
22
+
23
+ # 参数设置 https://juejin.cn/post/7005979638904127518
24
+
25
+ self.description = <<-DESC
26
+ 一个CocoaPods插件,基于对zabel的封装
27
+ DESC
28
+
29
+ self.arguments = [
30
+ #CLAide::Argument.new('update',true)
31
+ ]
32
+
33
+ # 可选参数
34
+ def self.options
35
+ [
36
+ ['--update', 'need exec pod update'],
37
+ ['--install', 'need exec pod install']
38
+ ].concat(super)
39
+ end
40
+
41
+ def initialize(argv)
42
+ #puts "xccache 初始化参数 #{argv.to_s}"
43
+ #@name = argv.shift_argument
44
+ @update = argv.flag?("update")
45
+ @install = argv.flag?("install")
46
+ super
47
+ end
48
+
49
+ def validate!
50
+ super
51
+ #help! 'A Pod name is required.' unless @name
52
+ end
53
+
54
+ def run
55
+ UI.puts "[XCCACHE/I] 开始执行pod xccache 流程:"
56
+ Zabel.zabel_post({})
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,51 @@
1
+ module Pod
2
+ class Command
3
+ # This is an example of a cocoapods plugin adding a top-level subcommand
4
+ # to the 'pod' command.
5
+ #
6
+ # You can also create subcommands of existing or new commands. Say you
7
+ # wanted to add a subcommand to `list` to show newly deprecated pods,
8
+ # (e.g. `pod list deprecated`), there are a few things that would need
9
+ # to change.
10
+ #
11
+ # - move this file to `lib/pod/command/list/deprecated.rb` and update
12
+ # the class to exist in the the Pod::Command::List namespace
13
+ # - change this class to extend from `List` instead of `Command`. This
14
+ # tells the plugin system that it is a subcommand of `list`.
15
+ # - edit `lib/cocoapods_plugins.rb` to require this file
16
+ #
17
+ # @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
18
+ # in the `plugins.json` file, once your plugin is released.
19
+ #
20
+ class Xcextract < Command
21
+ self.summary = '基于Xcode cache的缓存插件之extract'
22
+
23
+ # 参数设置 https://juejin.cn/post/7005979638904127518
24
+
25
+ self.description = <<-DESC
26
+ 一个CocoaPods插件,基于对zabel的封装
27
+ DESC
28
+
29
+ self.arguments = [
30
+ CLAide::Argument.new('targetcachedir', "${HOME}/zabel")
31
+ ]
32
+
33
+ def initialize(argv)
34
+ @targetcachedir = argv.shift_argument
35
+ UI.print "[XCCACHE/I] extract target_cache_dir => #{@targetcachedir}"
36
+ super
37
+ end
38
+
39
+ def validate!
40
+ super
41
+ #help! 'A Pod name is required.' unless @name
42
+ end
43
+
44
+ def run
45
+ UI.puts "[XCCACHE/I] 开始执行 extract 函数"
46
+ Zabel.zabel_extract(@targetcachedir)
47
+ end
48
+ end
49
+ end
50
+ end
51
+
@@ -0,0 +1,69 @@
1
+ module Pod
2
+ class Command
3
+ # This is an example of a cocoapods plugin adding a top-level subcommand
4
+ # to the 'pod' command.
5
+ #
6
+ # You can also create subcommands of existing or new commands. Say you
7
+ # wanted to add a subcommand to `list` to show newly deprecated pods,
8
+ # (e.g. `pod list deprecated`), there are a few things that would need
9
+ # to change.
10
+ #
11
+ # - move this file to `lib/pod/command/list/deprecated.rb` and update
12
+ # the class to exist in the the Pod::Command::List namespace
13
+ # - change this class to extend from `List` instead of `Command`. This
14
+ # tells the plugin system that it is a subcommand of `list`.
15
+ # - edit `lib/cocoapods_plugins.rb` to require this file
16
+ #
17
+ # @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
18
+ # in the `plugins.json` file, once your plugin is released.
19
+ #
20
+ class Xcprepare < Command
21
+ self.summary = '基于Xcode cache的缓存插件之准备'
22
+
23
+ # 参数设置 https://juejin.cn/post/7005979638904127518
24
+
25
+ self.description = <<-DESC
26
+ 一个CocoaPods插件,基于对zabel的封装
27
+ DESC
28
+
29
+ self.arguments = [
30
+ #CLAide::Argument.new('update',true)
31
+ ]
32
+
33
+ # 可选参数
34
+ def self.options
35
+ [
36
+ ['--update', 'need exec pod update'],
37
+ ['--install', 'need exec pod install']
38
+ ].concat(super)
39
+ end
40
+
41
+ def initialize(argv)
42
+ #puts "xccache 初始化参数 #{argv.to_s}"
43
+ #@name = argv.shift_argument
44
+ @update = argv.flag?("update")
45
+ @install = argv.flag?("install")
46
+ super
47
+ end
48
+
49
+ def validate!
50
+ super
51
+ #help! 'A Pod name is required.' unless @name
52
+ end
53
+
54
+ def run
55
+ UI.puts "开始进入准备阶段:"
56
+
57
+ #system "bundle install"
58
+ if @update
59
+ UI.puts "pod update"
60
+ # system "pod update"
61
+ else
62
+ UI.puts "pod install"
63
+ # system "pod install"
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+
@@ -0,0 +1,60 @@
1
+ module Pod
2
+ class Command
3
+ # This is an example of a cocoapods plugin adding a top-level subcommand
4
+ # to the 'pod' command.
5
+ #
6
+ # You can also create subcommands of existing or new commands. Say you
7
+ # wanted to add a subcommand to `list` to show newly deprecated pods,
8
+ # (e.g. `pod list deprecated`), there are a few things that would need
9
+ # to change.
10
+ #
11
+ # - move this file to `lib/pod/command/list/deprecated.rb` and update
12
+ # the class to exist in the the Pod::Command::List namespace
13
+ # - change this class to extend from `List` instead of `Command`. This
14
+ # tells the plugin system that it is a subcommand of `list`.
15
+ # - edit `lib/cocoapods_plugins.rb` to require this file
16
+ #
17
+ # @todo Create a PR to add your plugin to CocoaPods/cocoapods.org
18
+ # in the `plugins.json` file, once your plugin is released.
19
+ #
20
+ class Xcprintenv < Command
21
+ self.summary = '打印环境变量'
22
+
23
+ # 参数设置 https://juejin.cn/post/7005979638904127518
24
+
25
+ self.description = <<-DESC
26
+ 一个CocoaPods插件,基于对zabel的封装
27
+ DESC
28
+
29
+ self.arguments = [
30
+ # CLAide::Argument.new('update', true),
31
+ ]
32
+
33
+ def self.options
34
+ [
35
+ ['--targetname', 'target名称'],
36
+ ["--projectpath", '工程路径']
37
+ ].concat(super)
38
+ end
39
+
40
+ def initialize(argv)
41
+ #puts "xccache 初始化参数 #{argv.to_s}"
42
+ #@name = argv.shift_argument
43
+ @target_name = argv.option("targetname")
44
+ @project_path = argv.option("projectpath")
45
+ super
46
+ end
47
+
48
+ def validate!
49
+ super
50
+ #help! 'A Pod name is required.' unless @name
51
+ end
52
+
53
+ def run
54
+ UI.puts "[XCCACHE/I] 执行 printEnv"
55
+ Zabel.zabel_printenv(@target_name, @project_path)
56
+ end
57
+ end
58
+ end
59
+ end
60
+
@@ -0,0 +1,4 @@
1
+ require 'cocoapods-xccache/command/xccache'
2
+ require 'cocoapods-xccache/command/xcprintenv'
3
+ require 'cocoapods-xccache/command/xcprepare'
4
+ require 'cocoapods-xccache/command/xcextract'