gct 0.1.9 → 0.2.0
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 +6 -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: 437c189b8e27e16906f14ad43679cbc4f1dfe6ed507c91672f8fd297e53afbc7
|
4
|
+
data.tar.gz: ca539bc87c71bb641446e3e4208b0c5db6b343fc0ca3aa6cf1b71d1d16b58d77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15c37f850c4de024fbdbc0aeffcfdd837f4043685d98a14e583c439ba2e60d272534f13d352c72bfb23278857d9a92dbc00c0efbae70326bef2166372abb6ecc
|
7
|
+
data.tar.gz: 8ef271d4d05f8d9674c0eef90e7eac8620e00c689a887587434865e54e31b6e5fbe1b8e2f67673f3f26b01675034457a814b15e43f3e799b209b5563ece85ee6
|
@@ -13,6 +13,10 @@ module Gct
|
|
13
13
|
CLAide::Argument.new('BRANCH', false),
|
14
14
|
]
|
15
15
|
|
16
|
+
def self.options
|
17
|
+
[].concat(super)
|
18
|
+
end
|
19
|
+
|
16
20
|
def initialize(argv)
|
17
21
|
@url = argv.shift_argument
|
18
22
|
@branch = argv.shift_argument
|
@@ -40,6 +44,7 @@ module Gct
|
|
40
44
|
puts "#{dir}文件夹已存在!".red
|
41
45
|
else
|
42
46
|
branch = @branch.to_s.empty? ? '' : "-b #{@branch}"
|
47
|
+
push_branch = @branch.to_s.empty? ? "master" : "#{@branch}"
|
43
48
|
`git clone #{branch} #{@url}`
|
44
49
|
puts "git命令为:<-- git clone #{branch} #{@url} -->".green
|
45
50
|
Dir.chdir(path) do
|
@@ -48,7 +53,7 @@ module Gct
|
|
48
53
|
`git remote set-url origin #{git_url}.git`
|
49
54
|
`git add .`
|
50
55
|
`git commit -m "First commit"`
|
51
|
-
`git push
|
56
|
+
`git push origin #{push_branch}`
|
52
57
|
`git push --tags`
|
53
58
|
# TODO 将podspec上传到私有specs上
|
54
59
|
|
data/lib/gct/version.rb
CHANGED