bigkeeper 0.8.4 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +10 -1
- data/big_keeper.gemspec +2 -0
- data/lib/big_keeper.rb +3 -0
- data/lib/big_keeper/command/image.rb +26 -0
- data/lib/big_keeper/command/image/image.rb +0 -0
- data/lib/big_keeper/command/release/home.rb +16 -13
- data/lib/big_keeper/command/release/module.rb +2 -2
- data/lib/big_keeper/service/git_service.rb +3 -1
- data/lib/big_keeper/util/git_operator.rb +20 -2
- data/lib/big_keeper/util/list_generator.rb +1 -0
- data/lib/big_keeper/version.rb +1 -1
- metadata +32 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94a86d4f15a32e4d04576c9e244da060e5c1fb44
|
4
|
+
data.tar.gz: 138d77e976d07a10306b7e16b7462f03773785fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b2914cc67868b6fd125b5fbe615012efbb70bb8c8e78edf5ae90aa33a98d4d81b1675c72ae8db80e527e214f0b0aaf9961678f37a7196dc278f238f81c9bd07
|
7
|
+
data.tar.gz: 1e7ba514b4724074df6c28bae6f1a64d83810399e829087db8de59885317b297d6df96336c0ac3fd1974185abc38ece3ba4d3d1703f5314d52ea675632a2430a
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bigkeeper (0.8.
|
4
|
+
bigkeeper (0.8.5)
|
5
|
+
big_resources
|
5
6
|
big_stash (~> 0.1)
|
6
7
|
cocoapods
|
7
8
|
colorize
|
@@ -19,8 +20,15 @@ GEM
|
|
19
20
|
thread_safe (~> 0.3, >= 0.3.4)
|
20
21
|
tzinfo (~> 1.1)
|
21
22
|
ast (2.3.0)
|
23
|
+
big_resources (0.1.1)
|
24
|
+
chunky_png
|
25
|
+
cocoapods
|
26
|
+
colorize
|
27
|
+
gli (~> 2.16)
|
28
|
+
plist
|
22
29
|
big_stash (0.6.0)
|
23
30
|
gli (~> 2.16)
|
31
|
+
chunky_png (1.3.10)
|
24
32
|
claide (1.0.1)
|
25
33
|
cocoapods (1.2.1)
|
26
34
|
activesupport (>= 4.0.2, < 5)
|
@@ -100,6 +108,7 @@ PLATFORMS
|
|
100
108
|
ruby
|
101
109
|
|
102
110
|
DEPENDENCIES
|
111
|
+
big_resources
|
103
112
|
big_stash (~> 0.1)
|
104
113
|
bigkeeper!
|
105
114
|
bundler (~> 1.15)
|
data/big_keeper.gemspec
CHANGED
@@ -35,11 +35,13 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.add_runtime_dependency "cocoapods"
|
36
36
|
spec.add_runtime_dependency "plist"
|
37
37
|
spec.add_runtime_dependency "colorize"
|
38
|
+
spec.add_runtime_dependency "big_resources"
|
38
39
|
|
39
40
|
spec.add_development_dependency "bundler", "~> 1.15"
|
40
41
|
spec.add_development_dependency "rake", "~> 10.0"
|
41
42
|
spec.add_development_dependency "gli", "~> 2.16"
|
42
43
|
spec.add_development_dependency "big_stash", "~> 0.1"
|
44
|
+
spec.add_development_dependency "big_resources"
|
43
45
|
spec.add_development_dependency "cocoapods"
|
44
46
|
spec.add_development_dependency "plist"
|
45
47
|
spec.add_development_dependency "colorize"
|
data/lib/big_keeper.rb
CHANGED
@@ -13,6 +13,7 @@ require 'big_keeper/command/release'
|
|
13
13
|
require 'big_keeper/command/pod'
|
14
14
|
require 'big_keeper/command/module'
|
15
15
|
require 'big_keeper/command/spec'
|
16
|
+
require 'big_keeper/command/image'
|
16
17
|
|
17
18
|
require 'big_keeper/service/git_service'
|
18
19
|
|
@@ -50,6 +51,8 @@ module BigKeeper
|
|
50
51
|
|
51
52
|
spec_command
|
52
53
|
|
54
|
+
image_command
|
55
|
+
|
53
56
|
desc 'Show version of bigkeeper'
|
54
57
|
command :version do |version|
|
55
58
|
version.action do |global_options, options, args|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'big_resources/util/image/name_analyze_util'
|
2
|
+
|
3
|
+
module BigKeeper
|
4
|
+
|
5
|
+
def self.image_command
|
6
|
+
|
7
|
+
desc 'Image operation'
|
8
|
+
command :image do | c |
|
9
|
+
c.desc "Detect duplicate name images."
|
10
|
+
c.command :name do | name |
|
11
|
+
name.action do | global_options, options, args |
|
12
|
+
path = File.expand_path(global_options[:path])
|
13
|
+
BigResources::ImageAnalyzeUtil.get_duplicate_name_file_with_type(path, BigResources::PNG)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
c.desc "Detect duplicate content images."
|
18
|
+
c.command :content do | content |
|
19
|
+
content.action do | global_options, options, args |
|
20
|
+
path = File.expand_path(global_options[:path])
|
21
|
+
BigResources::ImageAnalyzeUtil.get_duplicate_content_file_with_type(path, BigResources::PNG)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
File without changes
|
@@ -13,11 +13,14 @@ module BigKeeper
|
|
13
13
|
version = BigkeeperParser.version if version == 'Version in Bigkeeper file'
|
14
14
|
modules = BigkeeperParser.module_names
|
15
15
|
|
16
|
-
CacheOperator.new(path).save('Podfile')
|
17
|
-
|
18
16
|
#stash
|
19
17
|
StashService.new.stash_all(path, GitOperator.new.current_branch(path), user, modules)
|
20
18
|
|
19
|
+
# delete cache
|
20
|
+
CacheOperator.new(path).clean()
|
21
|
+
# cache Podfile
|
22
|
+
CacheOperator.new(path).save('Podfile')
|
23
|
+
|
21
24
|
# check
|
22
25
|
GitOperator.new.check_diff(path, "develop", "master")
|
23
26
|
|
@@ -42,6 +45,7 @@ module BigKeeper
|
|
42
45
|
# step 3 change Info.plist value
|
43
46
|
InfoPlistOperator.new.change_version_build(path, version)
|
44
47
|
|
48
|
+
GitService.new.verify_push(path, "Change version to #{version}", "release/#{version}", 'Home')
|
45
49
|
DepService.dep_operator(path, user).install(true)
|
46
50
|
XcodeOperator.open_workspace(path)
|
47
51
|
end
|
@@ -50,38 +54,37 @@ module BigKeeper
|
|
50
54
|
BigkeeperParser.parse("#{path}/Bigkeeper")
|
51
55
|
version = BigkeeperParser.version if version == 'Version in Bigkeeper file'
|
52
56
|
Logger.highlight("Start finish release home for #{version}")
|
57
|
+
|
53
58
|
if GitOperator.new.has_branch(path, "release/#{version}")
|
54
59
|
if GitOperator.new.current_branch(path) != "release/#{version}"
|
55
60
|
GitOperator.new.checkout(path, "release/#{version}")
|
56
61
|
end
|
57
62
|
|
58
|
-
|
59
|
-
GitOperator.new.push_to_remote(path, "release/#{version}")
|
63
|
+
GitService.new.verify_push(path, "finish release branch", "release/#{version}", 'Home')
|
60
64
|
|
61
65
|
# master
|
62
66
|
GitOperator.new.checkout(path, "master")
|
63
67
|
GitOperator.new.merge(path, "release/#{version}")
|
64
|
-
|
65
|
-
|
66
|
-
GitOperator.new.checkout(path, "master")
|
67
|
-
end
|
68
|
+
GitService.new.verify_push(path, "release V#{version}", "master", 'Home')
|
69
|
+
|
68
70
|
GitOperator.new.tag(path, version)
|
69
71
|
|
70
|
-
#
|
72
|
+
# release branch
|
71
73
|
GitOperator.new.checkout(path, "release/#{version}")
|
72
74
|
CacheOperator.new(path).load('Podfile')
|
73
75
|
CacheOperator.new(path).clean()
|
74
|
-
GitOperator.new.commit(path, "reset #{
|
75
|
-
|
76
|
+
GitOperator.new.commit(path, "reset #{version} Podfile")
|
77
|
+
GitService.new.verify_push(path, "reset #{version} Podfile", "release/#{version}", 'Home')
|
76
78
|
|
79
|
+
# develop
|
77
80
|
GitOperator.new.checkout(path, "develop")
|
78
81
|
GitOperator.new.merge(path, "release/#{version}")
|
79
|
-
|
82
|
+
GitService.new.verify_push(path, "merge release/#{version} to develop", "develop", 'Home')
|
80
83
|
GitOperator.new.check_diff(path, "develop", "master")
|
81
84
|
|
82
85
|
Logger.highlight("Finish release home for #{version}")
|
83
86
|
else
|
84
|
-
raise Logger.error("
|
87
|
+
raise Logger.error("There is no release/#{version} branch, please use release home start first.")
|
85
88
|
end
|
86
89
|
end
|
87
90
|
|
@@ -49,9 +49,9 @@ module BigKeeper
|
|
49
49
|
Logger.highlight(%Q(Merge develop to master))
|
50
50
|
# merge develop to master
|
51
51
|
GitOperator.new.merge(module_path, "develop")
|
52
|
-
|
52
|
+
GitOperator.new.push_to_remote(module_path, "master")
|
53
53
|
|
54
|
-
|
54
|
+
GitOperator.new.tag(module_path, version)
|
55
55
|
# pod repo push
|
56
56
|
if spec == true
|
57
57
|
PodOperator.pod_repo_push(module_path, module_name, BigkeeperParser.source_spec_path(module_name), version)
|
@@ -118,7 +118,7 @@ module BigKeeper
|
|
118
118
|
def branchs_with_type(path, type)
|
119
119
|
branchs = []
|
120
120
|
Dir.chdir(path) do
|
121
|
-
IO.popen('git branch -
|
121
|
+
IO.popen('git branch -r') do | io |
|
122
122
|
io.each do | line |
|
123
123
|
branchs << line.gsub(/\s/, '') if line =~ /[\s\S]*#{GitflowType.name(type)}*/
|
124
124
|
end
|
@@ -171,6 +171,8 @@ module BigKeeper
|
|
171
171
|
else
|
172
172
|
git.push_to_remote(path, branch_name)
|
173
173
|
end
|
174
|
+
|
175
|
+
GitOperator.new.check_push_success(path, branch_name, "origin/#{branch_name}")
|
174
176
|
else
|
175
177
|
Logger.default("Nothing to push for '#{name}'.")
|
176
178
|
end
|
@@ -13,7 +13,7 @@ module BigKeeper
|
|
13
13
|
has_branch = false
|
14
14
|
IO.popen("cd #{path}; git branch -r") do |io|
|
15
15
|
io.each do |line|
|
16
|
-
has_branch = true if line.include? branch_name
|
16
|
+
has_branch = true if line.include? "(#{branch_name})"
|
17
17
|
end
|
18
18
|
end
|
19
19
|
has_branch
|
@@ -78,6 +78,7 @@ module BigKeeper
|
|
78
78
|
Dir.chdir(path) do
|
79
79
|
`git push -u origin #{branch_name}`
|
80
80
|
end
|
81
|
+
GitOperator.new.check_push_success(path, branch_name, "origin/#{branch_name}")
|
81
82
|
end
|
82
83
|
|
83
84
|
def pull(path)
|
@@ -186,7 +187,7 @@ module BigKeeper
|
|
186
187
|
}
|
187
188
|
Logger.error("#{compare_branch} branch has commit doesn't committed in #{branch}, please check")
|
188
189
|
else
|
189
|
-
Logger.highlight("#{compare_branch} branch doesn't
|
190
|
+
Logger.highlight("#{compare_branch} branch doesn't have commit before #{branch}")
|
190
191
|
end
|
191
192
|
end
|
192
193
|
|
@@ -196,6 +197,23 @@ module BigKeeper
|
|
196
197
|
end
|
197
198
|
end
|
198
199
|
|
200
|
+
def check_push_success(path, branch, compare_branch)
|
201
|
+
compare_branch_commits = Array.new
|
202
|
+
IO.popen("cd #{path}; git log --left-right #{branch}...#{compare_branch} --pretty=oneline") do |io|
|
203
|
+
io.each do |line|
|
204
|
+
compare_branch_commits.push(line) if (line.include? '>') || (line.include? 'fatal')
|
205
|
+
end
|
206
|
+
end
|
207
|
+
if compare_branch_commits.size > 0
|
208
|
+
compare_branch_commits.map { |item|
|
209
|
+
Logger.default(item)
|
210
|
+
}
|
211
|
+
Logger.error("#{branch} branch push unsuccess, please check")
|
212
|
+
else
|
213
|
+
Logger.highlight("#{branch} branch push success")
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
199
217
|
end
|
200
218
|
|
201
219
|
# p GitOperator.new.user
|
@@ -25,6 +25,7 @@ module BigKeeper
|
|
25
25
|
def self.to_json(home_branches, module_info_list, version)
|
26
26
|
json_array = []
|
27
27
|
print_all = version == "all versions"
|
28
|
+
home_branches = home_branches.uniq
|
28
29
|
home_branches.each do | home_branch_name |
|
29
30
|
next unless home_branch_name.include?(version) || print_all
|
30
31
|
branch_dic = {}
|
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.8.
|
4
|
+
version: 0.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mmoaay
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: big_resources
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: bundler
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,6 +150,20 @@ dependencies:
|
|
136
150
|
- - "~>"
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: '0.1'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: big_resources
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
139
167
|
- !ruby/object:Gem::Dependency
|
140
168
|
name: cocoapods
|
141
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -235,6 +263,8 @@ files:
|
|
235
263
|
- lib/big_keeper/command/feature&hotfix/start.rb
|
236
264
|
- lib/big_keeper/command/feature&hotfix/switch.rb
|
237
265
|
- lib/big_keeper/command/feature&hotfix/update.rb
|
266
|
+
- lib/big_keeper/command/image.rb
|
267
|
+
- lib/big_keeper/command/image/image.rb
|
238
268
|
- lib/big_keeper/command/module.rb
|
239
269
|
- lib/big_keeper/command/module/list.rb
|
240
270
|
- lib/big_keeper/command/pod.rb
|