gct 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 437c189b8e27e16906f14ad43679cbc4f1dfe6ed507c91672f8fd297e53afbc7
4
- data.tar.gz: ca539bc87c71bb641446e3e4208b0c5db6b343fc0ca3aa6cf1b71d1d16b58d77
3
+ metadata.gz: 5a9f289cba73e4497cb116307acf686f709f7deed589382d7c9d79821c46b758
4
+ data.tar.gz: 66d4cb837def2ece3db37da9d2b06613f9c0b3048a2cbe256923140ad36d4204
5
5
  SHA512:
6
- metadata.gz: 15c37f850c4de024fbdbc0aeffcfdd837f4043685d98a14e583c439ba2e60d272534f13d352c72bfb23278857d9a92dbc00c0efbae70326bef2166372abb6ecc
7
- data.tar.gz: 8ef271d4d05f8d9674c0eef90e7eac8620e00c689a887587434865e54e31b6e5fbe1b8e2f67673f3f26b01675034457a814b15e43f3e799b209b5563ece85ee6
6
+ metadata.gz: 4667aa38cfdad44d547b45f2b71898b73fa3fe37a6c74ea31a7f4e3c92cdb0abbe78c426893a1d8cbbd59fbac2c34adc400275b7ea9071d5f80cc5a93179059e
7
+ data.tar.gz: e5b0870876ed010c4411e00ea477ccbf3a4877b04e15de19c16a106d58c7a4b68c36babd41a707e0d17e2efbea9a3cea2e3fb5983a100a1b3465d648a35f5bb3
@@ -14,8 +14,14 @@ module Gct
14
14
 
15
15
  def initialize(argv)
16
16
  @name = argv.shift_argument
17
+ @push_spec = argv.flag?('push-spec', false)
17
18
  super
18
- @additional_args = argv.remainder!
19
+ end
20
+
21
+ def self.options
22
+ [
23
+ ['--push-spec', '是否上传到pod私有仓库'],
24
+ ].concat(super)
19
25
  end
20
26
 
21
27
  def validate!
@@ -28,8 +34,11 @@ module Gct
28
34
 
29
35
  def run
30
36
  system "pod lib create #{@name} objc --template-url=#{Constant.GitURL}pod-template.git"
31
- # TODO 将podspec上传到私有specs上
32
37
  puts "一个新的oc pod创建成功!".green
38
+
39
+ Dir.chdir(Dir.pwd + '/' + @name) do
40
+ system "pod repo push iOSCRGTPodSource --sources=https://gi-dev.ccrgt.com/ios/iOSCRGTPodSource.git --verbose --skip-import-validation --use-libraries --allow-warnings" if @push_spec
41
+ end
33
42
  end
34
43
  end
35
44
  end
@@ -14,8 +14,14 @@ module Gct
14
14
 
15
15
  def initialize(argv)
16
16
  @name = argv.shift_argument
17
+ @push_spec = argv.flag?('push-spec', false)
17
18
  super
18
- @additional_args = argv.remainder!
19
+ end
20
+
21
+ def self.options
22
+ [
23
+ ['--push-spec', '是否上传到pod私有仓库'],
24
+ ].concat(super)
19
25
  end
20
26
 
21
27
  def validate!
@@ -28,8 +34,11 @@ module Gct
28
34
 
29
35
  def run
30
36
  system "pod lib create #{@name} swift --template-url=#{Constant.GitURL}pod-template"
31
- # TODO 将podspec上传到私有specs上
32
37
  puts "一个新的swift pod创建成功!".green
38
+
39
+ Dir.chdir(Dir.pwd + '/' + @name) do
40
+ system "pod repo push iOSCRGTPodSource --sources=https://gi-dev.ccrgt.com/ios/iOSCRGTPodSource.git --verbose --skip-import-validation --use-libraries --allow-warnings" if @push_spec
41
+ end
33
42
  end
34
43
  end
35
44
  end
data/lib/gct/version.rb CHANGED
@@ -2,5 +2,5 @@ module Gct
2
2
  # freeze 冻结对象,将对象变成一个常量
3
3
  # unless 右边的代码块成立,才会运行左边的代码块
4
4
  # defined? 是用来判断本地变量是否存在,也可用来判断是否存在方法
5
- VERSION = "0.2.0".freeze unless defined? Gct::VERSION
5
+ VERSION = "0.2.1".freeze unless defined? Gct::VERSION
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - jieming