bytedance 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bytedance/version.rb +1 -1
- data/lib/bytedance.rb +12 -30
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66a7433a4956a13e77d9f3398ab531a0b7c9020e
|
4
|
+
data.tar.gz: 2189202ba7835134a4730012668d800fdcbb1081
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa141f9e88b464a4059aed0d4f42aecafc08049ae818ea64b221d6e5291b36509cc6a7e1f9a06a5d94ee20b7cc24c16dae293c29b863749967b5f0cac9bd4d9f
|
7
|
+
data.tar.gz: 0137f8d7576282646b028ef603f1aeae3f94cfc5a2fbf2bcc137f0190ee20015fa039d8c1bb04b9a9f277aed4e05befb0c68e3679f903b6502813f3c7a1342c1
|
data/lib/bytedance/version.rb
CHANGED
data/lib/bytedance.rb
CHANGED
@@ -47,49 +47,31 @@ class BytedanceManager < CLAide::Command
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def initialize(params)
|
50
|
-
|
50
|
+
@projectName = params.shift_argument
|
51
|
+
@components = params.option('components','optional')
|
52
|
+
@prefix = params.option('prefix','TT')
|
53
|
+
@platform = params.flag?('platform',true)
|
51
54
|
super
|
52
55
|
end
|
53
56
|
|
54
57
|
def validate!
|
55
58
|
super
|
56
59
|
if @components && !%w(none optional all).include?(@components)
|
57
|
-
help! "`#{@components}'
|
60
|
+
help! "`#{@components}' 参数无效,components = none 或 optional 或 all "
|
58
61
|
end
|
62
|
+
|
63
|
+
if !@projectName
|
64
|
+
help! "参数错误,需要输入项目名称,bytedance lib create projectName"
|
65
|
+
end
|
66
|
+
|
59
67
|
end
|
60
68
|
|
61
69
|
def run
|
62
70
|
super
|
63
|
-
|
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)
|
64
73
|
Pod::Command::Lib::Create.new(finalParams).run
|
65
74
|
end
|
66
|
-
|
67
|
-
def formatParam(params)
|
68
|
-
@arguments = params.arguments
|
69
|
-
@arguments.insert(0,params.shift_argument)
|
70
|
-
if params.flag?('platform') == nil
|
71
|
-
addParam('--platform')
|
72
|
-
end
|
73
|
-
@components = params.option('components')
|
74
|
-
if @components == nil
|
75
|
-
addParam('--components=optional')
|
76
|
-
end
|
77
|
-
|
78
|
-
if params.option('prefix') == nil
|
79
|
-
puts "输入prfix:"
|
80
|
-
result = STDIN.gets.chomp
|
81
|
-
if result == nil
|
82
|
-
result = "TT"
|
83
|
-
end
|
84
|
-
addParam('--prefix=' + result)
|
85
|
-
end
|
86
|
-
addParam('--template-url=git@code.byted.org:jialei.jay/pod-template.git')
|
87
|
-
end
|
88
|
-
|
89
|
-
def addParam(param)
|
90
|
-
@arguments.insert(1,param)
|
91
|
-
end
|
92
|
-
|
93
75
|
end
|
94
76
|
|
95
77
|
class Publish < Lib
|