gct 0.2.2 → 0.2.3

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: 945850f9d0cef1e2922c214e7159e15d65ca3bfd3845ba31523b44613e705a55
4
- data.tar.gz: dcee6fa0a83431cea1f8f5a76d12a41f3a110430d535825ef65f8f96589bfb0d
3
+ metadata.gz: '082a49a2386dd5fab0951d435ada7ece16e6dfb672668f2183b165bf499a574e'
4
+ data.tar.gz: 34b1df53167ed0b4374920e0eaadd1c400224b6c92c867b501ec673837430d07
5
5
  SHA512:
6
- metadata.gz: ace7948bf2be1cd6907febc1d351694aef0fa6e9444eeaf2b016b8dbe62b153b3a0b2c3b648404688d9eac328d78d5956049675628862a8900c56740166e17b8
7
- data.tar.gz: c4e4256053bf0345d9ba12876bb6c6edd59343e537d9633aeea1d323e806a22642a547131b4139ab5e6f2cf5ff8f3d6fe262645733906b9a7ce71fb84ed8a325
6
+ metadata.gz: 8ad0896b6eb3a0256cb03734b95e95b7ce64fb0bbab6180304da2b07cc790190c2163ae20bc70abbb56513eeece8ef81fd23a21c05737f1a8ca808f07e5a862f
7
+ data.tar.gz: 41f542402af719b62d36af1fcfadc76ecfc2d1812314d39669df4770c08c7f6fc8a39837ec2fbba7cf3ee54b159454bc1a75e01f4b9c1b985ce20e2e215db37f
@@ -14,12 +14,15 @@ module Gct
14
14
  ]
15
15
 
16
16
  def self.options
17
- [].concat(super)
17
+ [
18
+ ['--skip-push-spec', '不上传到pod私有仓库'],
19
+ ].concat(super)
18
20
  end
19
21
 
20
22
  def initialize(argv)
21
23
  @url = argv.shift_argument
22
24
  @branch = argv.shift_argument
25
+ @skip_push_spec = argv.flag?('skip-push-spec', false)
23
26
  super
24
27
  end
25
28
 
@@ -34,6 +37,7 @@ module Gct
34
37
  else
35
38
  puts "该链接不是一个Git仓库".red
36
39
  end
40
+
37
41
  end
38
42
 
39
43
  def fork_third_pod_to_gitlab
@@ -45,21 +49,20 @@ module Gct
45
49
  else
46
50
  branch = @branch.to_s.empty? ? '' : "-b #{@branch}"
47
51
  push_branch = @branch.to_s.empty? ? "master" : "#{@branch}"
48
- `git clone #{branch} #{@url}`
49
52
  puts "git命令为:<-- git clone #{branch} #{@url} -->".green
53
+ `git clone #{branch} #{@url}`
50
54
  Dir.chdir(path) do
51
- git_url = "#{Constant.GitThirdURL}#{dir}"
55
+ git_url = "#{Constant.GitURL}#{dir}"
52
56
  `git init`
53
57
  `git remote set-url origin #{git_url}.git`
54
58
  `git add .`
55
59
  `git commit -m "First commit"`
56
60
  `git push origin #{push_branch}`
57
61
  `git push --tags`
58
- # TODO 将podspec上传到私有specs上
59
-
60
62
  puts "fork 第三方库成功!".green
61
63
  puts "git 地址为:#{git_url}".green
62
64
  system "open #{git_url}"
65
+ system "pod repo push iOSCRGTPodSource --sources=#{Constant.GitURL}iOSCRGTPodSource.git --skip-import-validation --use-libraries --allow-warnings" if !@skip_push_spec
63
66
  end
64
67
  end
65
68
  end
@@ -39,7 +39,6 @@ module Gct
39
39
  break
40
40
  end
41
41
  end
42
-
43
42
  end
44
43
  end
45
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.2".freeze unless defined? Gct::VERSION
5
+ VERSION = "0.2.3".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.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - jieming