bytedance 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/bytedance +0 -2
- data/bytedance.gemspec +3 -1
- data/lib/bytedance/version.rb +1 -1
- data/lib/bytedance.rb +13 -79
- data/lib/command/file_help.rb +0 -0
- data/lib/command/lib/create.rb +40 -1
- data/lib/command/lib/publish.rb +45 -0
- data/lib/command/lib.rb +13 -19
- metadata +32 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1766f3daaa13c3da20c6df6d06f0f623d529b97d
|
4
|
+
data.tar.gz: eb7de92ace141cbdda6cab97332371d3e6ee025f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe3da857150038a81bbf56878b468998dded199e03a7b3a456c1062a13bd0aba27201bee5ebdd4eba2ba2e6338ba5831b9e7559120b4773306bf33d36afced7e
|
7
|
+
data.tar.gz: 8b8d4a8cc774e19ff16a0848c64f1baf09433a65ccafc78b1fb339ac80b39c1b719b4de6ce6fe162f5937d4b69313a8214da768c10f9bce71034746c4f944cec
|
data/bin/bytedance
CHANGED
data/bytedance.gemspec
CHANGED
@@ -29,5 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency "xcodeproj",'~> 0'
|
30
30
|
spec.add_development_dependency "json",'~> 0'
|
31
31
|
spec.add_development_dependency "terminal-table",'~> 0'
|
32
|
-
|
32
|
+
spec.add_development_dependency "fastlane", '~> 0'
|
33
|
+
spec.add_development_dependency "colored" ,'~> 0'
|
34
|
+
|
33
35
|
end
|
data/lib/bytedance/version.rb
CHANGED
data/lib/bytedance.rb
CHANGED
@@ -3,97 +3,31 @@
|
|
3
3
|
require 'claide'
|
4
4
|
require 'colored'
|
5
5
|
require 'cocoapods'
|
6
|
+
require 'fastlane'
|
6
7
|
|
7
|
-
class BytedanceManager < CLAide::Command
|
8
|
-
self.abstract_command = true
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
self.command = 'bytedance'
|
15
|
-
|
16
|
-
def self.options
|
17
|
-
[
|
18
|
-
|
19
|
-
].concat(super)
|
20
|
-
end
|
21
|
-
|
22
|
-
def run
|
23
|
-
|
24
|
-
end
|
25
|
-
|
26
|
-
class Lib < BytedanceManager
|
27
|
-
|
9
|
+
module Bytedance
|
10
|
+
|
11
|
+
class BytedanceManager < CLAide::Command
|
12
|
+
require_relative './command/lib'
|
28
13
|
self.abstract_command = true
|
29
|
-
self.summary = ''
|
30
14
|
|
31
15
|
self.description = <<-DESC
|
32
|
-
|
16
|
+
|
33
17
|
DESC
|
34
18
|
|
35
|
-
|
36
|
-
super
|
37
|
-
|
38
|
-
end
|
39
|
-
|
40
|
-
class Create < Lib
|
41
|
-
self.summary = ''
|
42
|
-
|
43
|
-
def self.options
|
44
|
-
[['--platform', '是否引入平台基础库,默认引入,不引入使用--no-platform'],
|
45
|
-
['--components=[none|optional|all]', 'none 不引入任何组件,optional 选择自己想要的(default), all 引入全部组件,于平台一致'],
|
46
|
-
['--prefix', '可选,默认 prefix = TT']].concat(super)
|
47
|
-
end
|
48
|
-
|
49
|
-
def initialize(params)
|
50
|
-
@projectName = params.shift_argument
|
51
|
-
@components = params.option('components','optional')
|
52
|
-
@prefix = params.option('prefix','TT')
|
53
|
-
@platform = params.flag?('platform',true)
|
54
|
-
super
|
55
|
-
end
|
56
|
-
|
57
|
-
def validate!
|
58
|
-
super
|
59
|
-
if @components && !%w(none optional all).include?(@components)
|
60
|
-
help! "`#{@components}' 参数无效,components = none 或 optional 或 all "
|
61
|
-
end
|
19
|
+
self.command = 'bytedance'
|
62
20
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
end
|
68
|
-
|
69
|
-
def run
|
70
|
-
super
|
71
|
-
parameter = [@projectName,'--components='+ @components,'--prefix=' + @prefix, @platform ? '--platform' : '--no-platform', '--template-url=git@code.byted.org:TTIOS/pod-template.git']
|
72
|
-
finalParams = CLAide::ARGV.new(parameter)
|
73
|
-
Pod::Command::Lib::Create.new(finalParams).run
|
74
|
-
end
|
21
|
+
def self.options
|
22
|
+
[
|
23
|
+
|
24
|
+
].concat(super)
|
75
25
|
end
|
76
26
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
def self.options
|
81
|
-
[['--iced', 'the ice-tea version']].concat(super)
|
82
|
-
end
|
83
|
-
|
84
|
-
def initialize(argv)
|
85
|
-
@flavor = argv.shift_argument
|
86
|
-
@iced = argv.flag?('iced')
|
87
|
-
super
|
88
|
-
end
|
89
|
-
|
90
|
-
def run
|
91
|
-
super
|
92
|
-
|
93
|
-
end
|
27
|
+
def run
|
28
|
+
|
94
29
|
end
|
95
30
|
|
96
31
|
end
|
97
32
|
|
98
33
|
end
|
99
|
-
|
File without changes
|
data/lib/command/lib/create.rb
CHANGED
@@ -1,3 +1,42 @@
|
|
1
|
+
module Bytedance
|
2
|
+
class BytedanceManager
|
3
|
+
class Lib
|
1
4
|
class Create < Lib
|
5
|
+
self.summary = ''
|
2
6
|
|
3
|
-
|
7
|
+
def self.options
|
8
|
+
[['--platform', '是否引入平台基础库,默认引入,不引入使用--no-platform'],
|
9
|
+
['--components=[none|optional|all]', 'none 不引入任何组件,optional 选择自己想要的(default), all 引入全部组件,于平台一致'],
|
10
|
+
['--prefix', '可选,默认 prefix = TT']].concat(super)
|
11
|
+
end
|
12
|
+
|
13
|
+
def initialize(params)
|
14
|
+
@projectName = params.shift_argument
|
15
|
+
@components = params.option('components','optional')
|
16
|
+
@prefix = params.option('prefix','TT')
|
17
|
+
@platform = params.flag?('platform',true)
|
18
|
+
super
|
19
|
+
end
|
20
|
+
|
21
|
+
def validate!
|
22
|
+
super
|
23
|
+
if @components && !%w(none optional all).include?(@components)
|
24
|
+
help! "`#{@components}' 参数无效,components = none 或 optional 或 all "
|
25
|
+
end
|
26
|
+
|
27
|
+
if !@projectName
|
28
|
+
help! "参数错误,需要输入项目名称,bytedance lib create projectName"
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
def run
|
34
|
+
super
|
35
|
+
parameter = [@projectName,'--components='+ @components,'--prefix=' + @prefix, @platform ? '--platform' : '--no-platform', '--template-url=git@code.byted.org:TTIOS/pod-template.git']
|
36
|
+
finalParams = CLAide::ARGV.new(parameter)
|
37
|
+
Pod::Command::Lib::Create.new(finalParams).run
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'fastlane/other_action'
|
2
|
+
require 'fastlane/fastlane_require'
|
3
|
+
require_relative '../helper/fastlane_helper'
|
4
|
+
|
5
|
+
module Bytedance
|
6
|
+
class BytedanceManager
|
7
|
+
class Lib
|
8
|
+
class Publish < Lib
|
9
|
+
self.summary = ''
|
10
|
+
|
11
|
+
def self.options
|
12
|
+
[['--project', '是否引入平台基础库,默认引入,不引入使用--no-platform'],
|
13
|
+
['--repo', 'none 不引入任何组件,optional 选择自己想要的(default), all 引入全部组件,于平台一致'],
|
14
|
+
['--pod-version', '可选,默认 prefix = TT']].concat(super)
|
15
|
+
end
|
16
|
+
|
17
|
+
def initialize(params)
|
18
|
+
super
|
19
|
+
@fastlane_helper = FastlaneHelper.new
|
20
|
+
@target_repo = params.option('repo','optional')
|
21
|
+
@target_project = params.option('project')
|
22
|
+
@target_version = params.option('pod-version')
|
23
|
+
end
|
24
|
+
|
25
|
+
def validate!
|
26
|
+
super
|
27
|
+
if @components && !%w(none optional all).include?(@components)
|
28
|
+
help! "`#{@components}' 参数无效,components = none 或 optional 或 all "
|
29
|
+
end
|
30
|
+
|
31
|
+
if !@target_project
|
32
|
+
help! "参数错误,需要输入项目名称,bytedance lib create projectName"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def run
|
37
|
+
super
|
38
|
+
puts "Publish running"
|
39
|
+
@fastlane_helper.execute_fastlane_action('git_pull')
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/lib/command/lib.rb
CHANGED
@@ -1,24 +1,18 @@
|
|
1
|
-
|
1
|
+
module Bytedance
|
2
|
+
class BytedanceManager
|
3
|
+
class Lib < BytedanceManager
|
4
|
+
require_relative './lib/publish'
|
5
|
+
require_relative './lib/create'
|
6
|
+
self.abstract_command = true
|
7
|
+
self.summary = ''
|
2
8
|
|
3
|
-
self.
|
9
|
+
self.description = <<-DESC
|
10
|
+
|
11
|
+
DESC
|
4
12
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
# This would normally default to `beverage-make`, based on the class’ name.
|
9
|
-
self.command = 'lib'
|
10
|
-
|
11
|
-
def self.options
|
12
|
-
[
|
13
|
-
['--no-milk', 'Don’t add milk to the beverage'],
|
14
|
-
['--sweetener=[sugar|honey]', 'Use one of the available sweeteners'],
|
15
|
-
].concat(super)
|
13
|
+
def run
|
14
|
+
super
|
15
|
+
end
|
16
16
|
end
|
17
|
-
|
18
|
-
def initialize(argv)
|
19
|
-
@add_milk = argv.flag?('milk', true)
|
20
|
-
@sweetener = argv.option('sweetener')
|
21
|
-
super
|
22
17
|
end
|
23
|
-
|
24
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bytedance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jialei
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,6 +94,34 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: fastlane
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: colored
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
97
125
|
description: manage tool
|
98
126
|
email:
|
99
127
|
- 4705140@qq.com
|
@@ -114,8 +142,10 @@ files:
|
|
114
142
|
- bytedance.gemspec
|
115
143
|
- lib/bytedance.rb
|
116
144
|
- lib/bytedance/version.rb
|
145
|
+
- lib/command/file_help.rb
|
117
146
|
- lib/command/lib.rb
|
118
147
|
- lib/command/lib/create.rb
|
148
|
+
- lib/command/lib/publish.rb
|
119
149
|
homepage: https://code.byted.org/jialei.jay/tool_bytedance
|
120
150
|
licenses:
|
121
151
|
- MIT
|