bigkeeper 0.8.8 → 0.8.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9eaa70208d94d55946d3377b17be578f9c3e0932
4
- data.tar.gz: ff1ed0d365a01e369006174ca4c302cd96404957
3
+ metadata.gz: accc51fc75fc6d9d662aee5a2f6201682d3eaf1f
4
+ data.tar.gz: 1de9680bcb63b9bd8c0062945d96bd173e57adfe
5
5
  SHA512:
6
- metadata.gz: 463292cbc33f46ab64da6bf555d05b5a43da58ea0447bfa675bc931740d831c5889d19caa2b5a2d7839a655f14c11638cacf0d57d3a6a26a8c85704fe4fc34c2
7
- data.tar.gz: 69edb9b632b0a40005358fb405e0c9fd1a52d59d1bd33cc7c507fabcc6689d3d93ede8e712ffae3ebaf368dd01e277ae6fff5b71fa78d3ecc7ab7633768e6db1
6
+ metadata.gz: 00df2a04ec69be4a786849b4f7138ec4e282eba92f3364696ae393e35598a693f132ba0ad352beef2f9bab3ce178bc815d7e14d8c0a70ed32b7dffd3167f2518
7
+ data.tar.gz: bb9473f395ff7729223cd50ad0f855c3f3db0e031c8e9706913907665ddb9432e802f30784e0415f73e8f713462f09cd0e30caf3e157d3084c48206146d6b095
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bigkeeper (0.8.7)
4
+ bigkeeper (0.8.8)
5
5
  big_resources
6
6
  big_stash (~> 0.1)
7
7
  cocoapods
@@ -62,6 +62,7 @@ module BigKeeper
62
62
  desc 'Show version of bigkeeper'
63
63
  command :version do |version|
64
64
  version.action do |global_options, options, args|
65
+ LeanCloudLogger.instance.set_command("version")
65
66
  p "bigkeeper (#{VERSION})"
66
67
  end
67
68
  end
@@ -37,6 +37,8 @@ module BigKeeper
37
37
  add_modules = modules - current_modules
38
38
  del_modules = current_modules - modules
39
39
 
40
+ # Clean module cache
41
+ ModuleCacheOperator.new(path).clean_modules
40
42
  ModuleCacheOperator.new(path).cache_path_modules(modules, add_modules, del_modules)
41
43
  remain_path_modules = ModuleCacheOperator.new(path).remain_path_modules
42
44
 
@@ -109,7 +109,7 @@ module BigKeeper
109
109
  end
110
110
  for pwd in tags_repos_pwd do
111
111
  path = pwd.chomp
112
- IO.popen("cd #{path}; ls") do |io|
112
+ IO.popen("cd '#{path}'; ls") do |io|
113
113
  io.each do |line|
114
114
  tags_spec_list.push(line)
115
115
  end
@@ -64,12 +64,12 @@ module BigKeeper
64
64
  end
65
65
 
66
66
  def self.parse_source(name)
67
- @@config.delete("tmpSpec")
67
+ @@config.delete("tmp_spec")
68
68
  source_split = name.split(",") unless name.split(",").length != 2
69
69
  if source_split != nil
70
70
  sources = Hash["#{source_split[1].lstrip}" => "#{source_split[0]}"]
71
71
  @@config[:source] = sources
72
- @@config[:tmpSpec] = source_split[1].lstrip
72
+ @@config[:tmp_spec] = source_split[1].lstrip
73
73
  end
74
74
  end
75
75
 
@@ -96,7 +96,7 @@ module BigKeeper
96
96
  elsif params[:git]
97
97
  parse_modules_mod(name, params)
98
98
  else
99
- Logger.error(%(There should be ':path =>' or ':git =>' for mod #{name}))
99
+ Logger.error(%(There should be ':path =>' or ':git =>' ':alias =>' for mod #{name}))
100
100
  end
101
101
  end
102
102
 
@@ -112,7 +112,7 @@ module BigKeeper
112
112
 
113
113
  def self.parse_modules_mod(name, params)
114
114
  if @@config[:source] != nil
115
- params[:spec] = "#{@@config[:tmpSpec]}"
115
+ params[:spec] = "#{@@config[:tmp_spec]}"
116
116
  end
117
117
  modules = @@config[:modules]
118
118
  modules[name] = params
@@ -145,6 +145,19 @@ module BigKeeper
145
145
  @@config[:home][:git]
146
146
  end
147
147
 
148
+ def self.home_modules_workspace()
149
+ if @@config[:home][:modules_workspace]
150
+ home_modules_workspace = @@config[:home][:modules_workspace]
151
+ if home_modules_workspace.rindex('/') != home_modules_workspace.length - 1
152
+ home_modules_workspace = home_modules_workspace + '/'
153
+ end
154
+
155
+ home_modules_workspace
156
+ else
157
+ '../'
158
+ end
159
+ end
160
+
148
161
  def self.home_pulls()
149
162
  @@config[:home][:pulls]
150
163
  end
@@ -175,9 +188,13 @@ module BigKeeper
175
188
  && @@config[:users][user_name][:mods] \
176
189
  && @@config[:users][user_name][:mods][module_name] \
177
190
  && @@config[:users][user_name][:mods][module_name][:path]
178
- @@config[:users][user_name][:mods][module_name][:path]
191
+ File.expand_path(@@config[:users][user_name][:mods][module_name][:path])
179
192
  else
180
- File.expand_path("#{home_path}/../#{module_name}")
193
+ if @@config[:modules][module_name][:alias]
194
+ File.expand_path("#{home_path}/#{home_modules_workspace}/#{@@config[:modules][module_name][:alias]}")
195
+ else
196
+ File.expand_path("#{home_path}/#{home_modules_workspace}/#{module_name}")
197
+ end
181
198
  end
182
199
  end
183
200
 
@@ -187,9 +204,14 @@ module BigKeeper
187
204
  && @@config[:users][user_name][:mods] \
188
205
  && @@config[:users][user_name][:mods][module_name] \
189
206
  && @@config[:users][user_name][:mods][module_name][:path]
190
- @@config[:users][user_name][:mods][module_name][:path]
207
+ File.expand_path(@@config[:users][user_name][:mods][module_name][:path])
191
208
  else
192
- "../#{module_name}"
209
+ p @@config[:modules][module_name]
210
+ if @@config[:modules][module_name][:alias]
211
+ "#{home_modules_workspace}#{@@config[:modules][module_name][:alias]}"
212
+ else
213
+ "#{home_modules_workspace}#{module_name}"
214
+ end
193
215
  end
194
216
  end
195
217
 
@@ -11,7 +11,7 @@ module BigKeeper
11
11
 
12
12
  def has_remote_branch(path, branch_name)
13
13
  has_branch = false
14
- IO.popen("cd #{path}; git branch -r") do |io|
14
+ IO.popen("cd '#{path}'; git branch -r") do |io|
15
15
  io.each do |line|
16
16
  has_branch = true if line.include? branch_name
17
17
  end
@@ -21,7 +21,7 @@ module BigKeeper
21
21
 
22
22
  def has_local_branch(path, branch_name)
23
23
  has_branch = false
24
- IO.popen("cd #{path}; git branch") do |io|
24
+ IO.popen("cd '#{path}'; git branch") do |io|
25
25
  io.each do |line|
26
26
  has_branch = true if line.include? branch_name
27
27
  end
@@ -31,7 +31,7 @@ module BigKeeper
31
31
 
32
32
  def has_branch(path, branch_name)
33
33
  has_branch = false
34
- IO.popen("cd #{path}; git branch -a") do |io|
34
+ IO.popen("cd '#{path}'; git branch -a") do |io|
35
35
  io.each do |line|
36
36
  has_branch = true if line.include? branch_name
37
37
  end
@@ -89,7 +89,7 @@ module BigKeeper
89
89
 
90
90
  def has_commits(path, branch_name)
91
91
  has_commits = false
92
- IO.popen("cd #{path}; git log --branches --not --remotes") do |io|
92
+ IO.popen("cd '#{path}'; git log --branches --not --remotes") do |io|
93
93
  io.each do |line|
94
94
  has_commits = true if line.include? "(#{branch_name})"
95
95
  end
@@ -100,7 +100,7 @@ module BigKeeper
100
100
  def has_changes(path)
101
101
  has_changes = true
102
102
  clear_flag = 'nothing to commit, working tree clean'
103
- IO.popen("cd #{path}; git status") do |io|
103
+ IO.popen("cd '#{path}'; git status") do |io|
104
104
  io.each do |line|
105
105
  has_changes = false if line.include? clear_flag
106
106
  end
@@ -132,7 +132,7 @@ module BigKeeper
132
132
 
133
133
  def tag(path, version)
134
134
  tags = Array.new
135
- IO.popen("cd #{path}; git tag") do |io|
135
+ IO.popen("cd '#{path}'; git tag") do |io|
136
136
  io.each do |line|
137
137
  tags << line
138
138
  end
@@ -149,7 +149,7 @@ module BigKeeper
149
149
 
150
150
  def tag_list(path)
151
151
  tag_list = Array.new
152
- IO.popen("cd #{path}; git tag -l") do |io|
152
+ IO.popen("cd '#{path}'; git tag -l") do |io|
153
153
  io.each do |line|
154
154
  unless line=~(/[a-zA-Z]/)
155
155
  tag_list << line
@@ -161,7 +161,7 @@ module BigKeeper
161
161
 
162
162
  def check_merge(path, condition)
163
163
  unmerged_branch = Array.new
164
- IO.popen("cd #{path}; git branch --no-merged") do |io|
164
+ IO.popen("cd '#{path}'; git branch --no-merged") do |io|
165
165
  io.each do |line|
166
166
  unmerged_branch.push(line) if line.include? "#{condition}"
167
167
  end
@@ -176,7 +176,7 @@ module BigKeeper
176
176
 
177
177
  def check_diff(path, branch, compare_branch)
178
178
  compare_branch_commits = Array.new
179
- IO.popen("cd #{path}; git log --left-right #{branch}...#{compare_branch} --pretty=oneline") do |io|
179
+ IO.popen("cd '#{path}'; git log --left-right #{branch}...#{compare_branch} --pretty=oneline") do |io|
180
180
  io.each do |line|
181
181
  compare_branch_commits.push(line) if (line.include? '>') && (line.include? "Merge branch #{branch} into #{compare_branch}")
182
182
  end
@@ -192,14 +192,14 @@ module BigKeeper
192
192
  end
193
193
 
194
194
  def merge(path, branch_name)
195
- IO.popen("cd #{path}; git merge #{branch_name}") do |line|
195
+ IO.popen("cd '#{path}'; git merge #{branch_name}") do |line|
196
196
  Logger.error("Merge conflict in #{branch_name}") if line.include? 'Merge conflict'
197
197
  end
198
198
  end
199
199
 
200
200
  def check_push_success(path, branch, compare_branch)
201
201
  compare_branch_commits = Array.new
202
- IO.popen("cd #{path}; git log --left-right #{branch}...#{compare_branch} --pretty=oneline") do |io|
202
+ IO.popen("cd '#{path}'; git log --left-right #{branch}...#{compare_branch} --pretty=oneline") do |io|
203
203
  io.each do |line|
204
204
  compare_branch_commits.push(line) if (line.include? '>') || (line.include? 'fatal')
205
205
  end
@@ -9,7 +9,7 @@ module BigKeeper
9
9
  PodOperator.pod_update_private_repos(true)
10
10
  end
11
11
  Logger.highlight('Start pod install, waiting...')
12
- cmd = "pod install --project-directory=#{path}"
12
+ cmd = "pod install --project-directory='#{path}'"
13
13
  Open3.popen3(cmd) do |stdin, stdout, stderr, wait_thr|
14
14
  while line = stdout.gets
15
15
  p line
@@ -1,3 +1,3 @@
1
1
  module BigKeeper
2
- VERSION = "0.8.8"
2
+ VERSION = "0.8.9"
3
3
  end
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.8
4
+ version: 0.8.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - mmoaay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-29 00:00:00.000000000 Z
11
+ date: 2018-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gli
@@ -337,7 +337,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
337
337
  version: '0'
338
338
  requirements: []
339
339
  rubyforge_project:
340
- rubygems_version: 2.5.2.3
340
+ rubygems_version: 2.6.13
341
341
  signing_key:
342
342
  specification_version: 4
343
343
  summary: Efficiency improvement for iOS&Android modular development.