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 +4 -4
- data/lib/gct/command/create/third.rb +8 -5
- data/lib/gct/command/spec/lint.rb +0 -1
- data/lib/gct/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '082a49a2386dd5fab0951d435ada7ece16e6dfb672668f2183b165bf499a574e'
|
4
|
+
data.tar.gz: 34b1df53167ed0b4374920e0eaadd1c400224b6c92c867b501ec673837430d07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
[
|
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.
|
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
|
data/lib/gct/version.rb
CHANGED