bigkeeper 0.9.13 → 0.9.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/big +1 -1
- data/lib/big_keeper/command/feature&hotfix/module.rb +12 -8
- data/lib/big_keeper/dependency/dep_pod_operator.rb +4 -5
- data/lib/big_keeper/service/git_service.rb +1 -1
- data/lib/big_keeper/util/git_operator.rb +17 -6
- data/lib/big_keeper/util/list_generator.rb +1 -1
- data/lib/big_keeper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cae335c4028f88931e908c5e06e46be79e64ff6c18940ddec9be8da644a696c
|
4
|
+
data.tar.gz: 7afc0960f5701b2119235863982fc9bbc86468c621062df8c2b6af3c1ebe3810
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93726a66acd35be37a9552c3c5b47edb41a67cc354289addd3bd5dc28e3b17c9a8d876e49a01c439b9c0adf44c13d0323294a467e85da55b1470aa3ac9b6b69f
|
7
|
+
data.tar.gz: f9c36337abf07d8c51289d174010e0faee47e67219d7ee0b1374a2b7da9a48c274011ca11ff1866734c991ca749bab2d308d234aa1e821911115c4264d34e06e
|
data/Gemfile.lock
CHANGED
data/bin/big
CHANGED
@@ -25,20 +25,21 @@ module BigKeeper
|
|
25
25
|
|
26
26
|
full_name = branch_name.gsub(/#{GitflowType.name(type)}\//, '')
|
27
27
|
|
28
|
-
current_modules = ModuleCacheOperator.new(path).current_path_modules
|
29
|
-
|
30
28
|
# Verify input modules
|
31
29
|
modules = BigkeeperParser.verify_modules(modules)
|
32
30
|
|
33
|
-
|
31
|
+
current_modules = ModuleCacheOperator.new(path).current_path_modules
|
32
|
+
|
33
|
+
ModuleCacheOperator.new(path).clean_modules
|
34
|
+
ModuleCacheOperator.new(path).cache_path_modules(current_modules + modules, modules, [])
|
34
35
|
|
35
|
-
|
36
|
-
|
37
|
-
if
|
36
|
+
Logger.highlight("Start to add modules for branch '#{branch_name}'...")
|
37
|
+
|
38
|
+
if modules.empty?
|
38
39
|
Logger.default("There is nothing changed with modules #{modules}.")
|
39
40
|
else
|
40
41
|
# Modify podfile as path and Start modules feature
|
41
|
-
|
42
|
+
modules.each do |module_name|
|
42
43
|
ModuleCacheOperator.new(path).add_path_module(module_name)
|
43
44
|
ModuleService.new.add(path, user, module_name, full_name, type)
|
44
45
|
end
|
@@ -64,7 +65,10 @@ module BigKeeper
|
|
64
65
|
# Verify input modules
|
65
66
|
modules = BigkeeperParser.verify_modules(modules)
|
66
67
|
|
67
|
-
|
68
|
+
ModuleCacheOperator.new(path).clean_modules
|
69
|
+
ModuleCacheOperator.new(path).cache_path_modules(current_module + modules, [], modules)
|
70
|
+
|
71
|
+
Logger.highlight("Start to delete modules for branch '#{branch_name}'...")
|
68
72
|
|
69
73
|
if modules.empty?
|
70
74
|
Logger.default("There is nothing changed with modules #{modules}.")
|
@@ -150,7 +150,7 @@ module BigKeeper
|
|
150
150
|
GitOperator.new.check_diff(path, "develop", "master")
|
151
151
|
|
152
152
|
#checkout release branch
|
153
|
-
Logger.highlight(%Q(Start to checkout Branch release/#{version}))
|
153
|
+
Logger.highlight(%Q(Start to checkout Home Branch release/#{version}))
|
154
154
|
|
155
155
|
GitService.new.verify_checkout(path, "release/#{version}")
|
156
156
|
|
@@ -161,14 +161,13 @@ module BigKeeper
|
|
161
161
|
modules.each do |module_name|
|
162
162
|
Logger.highlight("release checkout release/#{version} for #{module_name}")
|
163
163
|
module_full_path = BigkeeperParser.module_full_path(path, user, module_name)
|
164
|
-
ModuleService.new.release_start(path, user, modules, module_name, version)
|
165
164
|
|
166
165
|
if GitOperator.new.has_branch(module_full_path, "release/#{version}")
|
166
|
+
Logger.highlight("#{module_name} has release/#{version}")
|
167
167
|
GitOperator.new.checkout(module_full_path, "release/#{version}")
|
168
168
|
else
|
169
|
-
|
170
|
-
|
171
|
-
|
169
|
+
Logger.highlight("#{module_name} dont have release/#{version}")
|
170
|
+
ModuleService.new.release_start(path, user, modules, module_name, version)
|
172
171
|
Logger.highlight("Push branch release/'#{version}' for #{module_name}...")
|
173
172
|
GitOperator.new.push_to_remote(module_full_path, "release/#{version}")
|
174
173
|
end
|
@@ -169,7 +169,7 @@ module BigKeeper
|
|
169
169
|
git.push_to_remote(path, branch_name)
|
170
170
|
end
|
171
171
|
|
172
|
-
GitOperator.new.check_push_success(path, branch_name, "
|
172
|
+
GitOperator.new.check_push_success(path, branch_name, "#{GitOperator.remote_local_name(path)}/#{branch_name}")
|
173
173
|
else
|
174
174
|
Logger.default("Nothing to push for '#{name}'.")
|
175
175
|
end
|
@@ -51,13 +51,13 @@ module BigKeeper
|
|
51
51
|
|
52
52
|
def fetch(path)
|
53
53
|
Dir.chdir(path) do
|
54
|
-
`git fetch
|
54
|
+
`git fetch #{GitOperator.remote_local_name(path)}`
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
58
|
def rebase(path, branch_name)
|
59
59
|
Dir.chdir(path) do
|
60
|
-
`git rebase
|
60
|
+
`git rebase #{GitOperator.remote_local_name(path)}/#{branch_name}`
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
@@ -76,9 +76,9 @@ module BigKeeper
|
|
76
76
|
|
77
77
|
def push_to_remote(path, branch_name)
|
78
78
|
Dir.chdir(path) do
|
79
|
-
`git push -u
|
79
|
+
`git push -u #{GitOperator.remote_local_name(path)} #{branch_name}`
|
80
80
|
end
|
81
|
-
GitOperator.new.check_push_success(path, branch_name, "
|
81
|
+
GitOperator.new.check_push_success(path, branch_name, "#{GitOperator.remote_local_name(path)}/#{branch_name}")
|
82
82
|
end
|
83
83
|
|
84
84
|
def pull(path)
|
@@ -122,7 +122,7 @@ module BigKeeper
|
|
122
122
|
|
123
123
|
def del_remote(path, branch_name)
|
124
124
|
Dir.chdir(path) do
|
125
|
-
`git push
|
125
|
+
`git push #{GitOperator.remote_local_name(path)} --delete #{branch_name}`
|
126
126
|
end
|
127
127
|
end
|
128
128
|
|
@@ -184,7 +184,7 @@ module BigKeeper
|
|
184
184
|
def check_remote_branch_diff(path, branch, compare_branch)
|
185
185
|
fetch(path)
|
186
186
|
compare_branch_commits = Array.new
|
187
|
-
IO.popen("cd '#{path}';git log --left-right #{branch}
|
187
|
+
IO.popen("cd '#{path}';git log --left-right #{branch}...#{GitOperator.remote_local_name(path)}/#{compare_branch} --pretty=oneline") do |io|
|
188
188
|
io.each do |line|
|
189
189
|
compare_branch_commits.push(line) unless (line.include? '>') && (line.include? "Merge branch \'#{branch}\'")
|
190
190
|
end
|
@@ -196,6 +196,17 @@ module BigKeeper
|
|
196
196
|
end
|
197
197
|
end
|
198
198
|
|
199
|
+
def self.remote_local_name(path)
|
200
|
+
Dir.chdir(path) do
|
201
|
+
IO.popen("git remote") do |io|
|
202
|
+
io.each do |line|
|
203
|
+
Logger.error("Check git remote setting.") if line.length == 0
|
204
|
+
return line.chomp
|
205
|
+
end
|
206
|
+
end
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
199
210
|
# TODO: 需要改造,util方法不应该有业务逻辑
|
200
211
|
def check_diff(path, branch, compare_branch)
|
201
212
|
compare_branch_commits = Array.new
|
data/lib/big_keeper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bigkeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mmoaay
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|