kookeeper 3.0.5 → 3.0.6

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
  SHA256:
3
- metadata.gz: 7718447d06913c05171af6d4ec81c0953c3d4d9e887459c985bc3ee9771dce7e
4
- data.tar.gz: ac5205ec448541b9f18a290cf45d23bc040d9d0e541c8688b748d8b37382f76b
3
+ metadata.gz: 33a8bec3932e96c58808fe6b50e205f181c58df2a24172b7cd2191064e973a2c
4
+ data.tar.gz: cad57a9f7876441d4b3224d7351988a1b7062b9ad34a9e77e9997d92cb799ecb
5
5
  SHA512:
6
- metadata.gz: c76b56a8b141755cc2c50ad3a4932514d4eeec66149cfbf8a2829b8480cdb0a5ae873531b96aaae193098e0678efe714beb62a2ff16dc561f6332f076a7c16c6
7
- data.tar.gz: 751772b95fb8e95f95ac6ffca60209846abac3a7fe9df09ee3f0cc611e45ed68c0623f47fe23caefc119b6ae402592986cf7f609ab90acf23a8c8a49ea61f382
6
+ metadata.gz: ac32efeef82e52182881b5f160dde2ca17b283f02841bb5c99d0ee535ecf723597edf0ba259d7a1b3f142a77274af628589126f7ff069be749836ef19318669f
7
+ data.tar.gz: 9e8a021e6439a697e6dc0456d090c0db703973a4f2e1b3e3c4d9986f076cd57334838da2c70ee55e996354c7f74aad3b5d162b0d4310a7e040c62a052e1087d4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kookeeper (3.0.5)
4
+ kookeeper (3.0.6)
5
5
  big_resources
6
6
  big_stash (~> 0.1)
7
7
  cocoapods
@@ -19,7 +19,8 @@ module BigKeeper
19
19
  # Parse Bigkeeper file
20
20
  BigkeeperParser.parse("#{path}/Bigkeeper")
21
21
 
22
- branch_name = GitOperator.new.current_branch(path)
22
+ home_branch_name = GitOperator.new.current_branch(path)
23
+ branch_name = ModuleCacheOperator.new(path).branch_name
23
24
  Logger.error("Not a #{GitflowType.name(type)} branch, exit.") unless branch_name.include? GitflowType.name(type)
24
25
 
25
26
  # Cache git modules
@@ -38,7 +39,7 @@ module BigKeeper
38
39
  Logger.highlight("Finish branch '#{branch_name}' for 'Home'")
39
40
 
40
41
  # Delete all path modules
41
- ModuleCacheOperator.new(path).cache_path_modules([], [], [])
42
+ # ModuleCacheOperator.new(path).cache_path_modules([], [], [])
42
43
 
43
44
  # Install
44
45
  DepService.dep_operator(path, user).install(false)
@@ -47,7 +48,7 @@ module BigKeeper
47
48
  DepService.dep_operator(path, user).open
48
49
 
49
50
  # Push home changes to remote
50
- GitService.new.verify_push(path, "finish branch #{branch_name}", branch_name, 'Home')
51
+ GitService.new.verify_push(path, "finish branch #{home_branch_name}", home_branch_name, 'Home')
51
52
  ensure
52
53
  end
53
54
  end
@@ -30,11 +30,14 @@ module BigKeeper
30
30
  p "----------3.full_name:#{full_name}"
31
31
  branch_name = "#{GitflowType.name(type)}/#{full_name}"
32
32
  p "----------4.branch_name:#{branch_name}"
33
+
34
+ ModuleCacheOperator.new(path).cache_branch_name(branch_name)
33
35
  home_branch_name = "release/#{version}"
34
36
  p "----------5.home_branch_name:#{home_branch_name}"
35
37
  p "----------6.path:#{path}"
36
38
  p "----------7.1验证home_branch"
37
- GitService.new.verify_home_branch(path, branch_name, OperateType::START)
39
+ GitService.new.verify_home_branch(path, home_branch_name, OperateType::START)
40
+ #GitService.new.verify_home_branch(path, branch_name, OperateType::START)
38
41
 
39
42
  stash_modules = ModuleCacheOperator.new(path).all_path_modules
40
43
  p "----------8.stash_modules:#{stash_modules}"
@@ -57,31 +60,31 @@ module BigKeeper
57
60
  ModuleCacheOperator.new(path).clean_modules
58
61
 
59
62
  # Cache all path modules
60
- p "----------Cache all path modules"
63
+ p "----------12.Cache all path modules"
61
64
  ModuleCacheOperator.new(path).cache_path_modules(modules, modules, [])
62
65
  modules = ModuleCacheOperator.new(path).remain_path_modules
63
- p "----------Backup home"
66
+ p "----------13.Backup home"
64
67
  # Backup home
65
68
  DepService.dep_operator(path, user).backup
66
69
 
67
- p "----------Start modules feature and modify module as path"
70
+ p "----------14.为模块建立分支并将podfile中地址切换到本地"
68
71
  # Start modules feature and modify module as path
69
72
  modules.each do |module_name|
70
73
  ModuleService.new.add(path, user, module_name, full_name, type)
71
74
  end
72
- p "----------install"
75
+ p "----------15.pod update"
73
76
  # install
74
77
  DepService.dep_operator(path, user).install(false )
75
- p "----------Open home workspace"
78
+ p "----------16.打开 workspace"
76
79
  # Open home workspace
77
80
  DepService.dep_operator(path, user).open
78
- p "----------Push home changes to remote"
81
+ p "----------17.Push home changes to remote"
79
82
  # Push home changes to remote
80
83
  Logger.highlight("Push branch release/#{version} for 'Home'...")
81
84
  GitService.new.verify_push(
82
85
  path,
83
- "init #{GitflowType.name(type)} #{full_name}",
84
- branch_name,
86
+ "start branch #{home_branch_name}",
87
+ home_branch_name,
85
88
  'Home')
86
89
  ensure
87
90
  end
@@ -21,11 +21,11 @@ module BigKeeper
21
21
  begin
22
22
  # Parse Bigkeeper file
23
23
  BigkeeperParser.parse("#{path}/Bigkeeper")
24
- branch_name = GitOperator.new.current_branch(path)
25
-
24
+ home_branch_name = GitOperator.new.current_branch(path)
25
+ branch_name = ModuleCacheOperator.new(path).branch_name
26
26
  # Logger.error("Not a #{GitflowType.name(type)} branch, exit.") unless branch_name.include? GitflowType.name(type)
27
27
 
28
- Logger.error("Not a #{GitflowType.name(GitflowType::RELEASE)} branch, exit.") unless branch_name.include? GitflowType.name(GitflowType::RELEASE)
28
+ # Logger.error("Not a #{GitflowType.name(GitflowType::RELEASE)} branch, exit.") unless branch_name.include? GitflowType.name(GitflowType::RELEASE)
29
29
 
30
30
 
31
31
  full_name = branch_name.gsub(/#{GitflowType.name(type)}\//, '')
@@ -65,6 +65,9 @@ module BigKeeper
65
65
 
66
66
  # Open home workspace
67
67
  DepService.dep_operator(path, user).open
68
+
69
+ # Push home changes to remote
70
+ GitService.new.verify_push(path, "update branch #{home_branch_name}", home_branch_name, 'Home')
68
71
  ensure
69
72
  end
70
73
  end
@@ -58,7 +58,8 @@ module BigKeeper
58
58
  end
59
59
  elsif ModuleOperateType::FINISH == module_operate_type
60
60
  module_git = BigkeeperParser.module_git(module_name)
61
- branch_name = GitOperator.new.current_branch(@path)
61
+ #branch_name = GitOperator.new.current_branch(@path)
62
+ branch_name = ModuleCacheOperator.new(@path).branch_name
62
63
  "#{$1}pod '#{module_name}', :git => '#{module_git}', :branch => '#{branch_name}'"
63
64
  elsif ModuleOperateType::PUBLISH == module_operate_type
64
65
  module_git = BigkeeperParser.module_git(module_name)
@@ -9,12 +9,12 @@ module BigKeeper
9
9
  class GitService
10
10
 
11
11
  def startHome(path, name, type)
12
- p "----------startHome"
12
+ p "--------------------11.1.startHome"
13
13
  git = GitOperator.new
14
14
  branch_name = "#{GitflowType.name(type)}/#{name}"
15
- p "----------branch_name:#{branch_name}"
15
+ p "--------------------11.2branch_name:#{branch_name}"
16
16
  if !git.has_remote_branch(path, branch_name) && !git.has_local_branch(path, branch_name)
17
- p "----------如果远程和本地没有#{branch_name}分支"
17
+ p "------------------------------11.2.1如果远程和本地没有#{branch_name}分支"
18
18
  verify_special_branch(path, 'master')
19
19
 
20
20
 
@@ -25,7 +25,7 @@ module BigKeeper
25
25
  #GitflowOperator.new.start(path, name, type)
26
26
  #
27
27
  Dir.chdir(path) do
28
- p "git checkout -b #{branch_name}"
28
+ p "------------------------------11.2.2git checkout -b #{branch_name}"
29
29
  `git checkout -b #{branch_name}`
30
30
  end
31
31
  git.push_to_remote(path, branch_name)
@@ -33,7 +33,7 @@ module BigKeeper
33
33
  verify_checkout(path, branch_name)
34
34
 
35
35
  if !git.has_remote_branch(path, branch_name)
36
- p "如果远程没有 #{branch_name}"
36
+ p "------------------------------11.3.1如果远程没有 #{branch_name}"
37
37
  git.push_to_remote(path, branch_name)
38
38
  end
39
39
  end
@@ -49,9 +49,9 @@ module BigKeeper
49
49
  verify_special_branch(path, 'master')
50
50
  #verify_special_branch(path, 'develop')
51
51
 
52
- GitflowOperator.new.verify_git_flow(path)
52
+ #GitflowOperator.new.verify_git_flow(path)
53
53
 
54
- GitflowOperator.new.start(path, name, type)
54
+ #GitflowOperator.new.start(path, name, type)
55
55
 
56
56
  verify_checkout(path, branch_name)
57
57
  git.push_to_remote(path, branch_name)
@@ -65,14 +65,15 @@ module BigKeeper
65
65
  end
66
66
 
67
67
  def verify_checkout(path, branch_name)
68
+ p "++++++++++verify_checkout:#{path} #{branch_name}"
68
69
  Dir.chdir(path) do
69
- p "----------cd:#{path}"
70
+ p "++++++++++cd:#{path}"
70
71
  cmd = "git checkout -b #{branch_name}"
71
72
  if GitOperator.new.has_branch(path, branch_name)
72
- p "有#{branch_name}"
73
+ p "++++++++++有#{branch_name}"
73
74
  cmd = "git checkout #{branch_name}"
74
75
  end
75
- p "cmd:#{cmd}"
76
+ p "++++++++++cmd:#{cmd}"
76
77
  IO.popen(cmd) do |io|
77
78
  io.each do |line|
78
79
  Logger.error("Checkout #{branch_name} failed.") if line.include? 'error'
@@ -34,10 +34,14 @@ module BigKeeper
34
34
  @modules = JSON.load(file.read())
35
35
  file.close
36
36
  else
37
- @modules = {"git" => {"all" => [], "current" => []}, "path" => {"all" => [], "add" => [], "del" => [], "current" => []}}
37
+ @modules = {"git" => {"all" => [], "current" => []}, "path" => {"all" => [], "add" => [], "del" => [], "current" => []},"branch_name" => ""}
38
38
  end
39
39
  end
40
40
 
41
+ def branch_name
42
+ @modules["branch_name"]
43
+ end
44
+
41
45
  def all_path_modules
42
46
  @modules["path"]["all"]
43
47
  end
@@ -70,6 +74,13 @@ module BigKeeper
70
74
  @modules["git"]["all"] - @modules["git"]["current"]
71
75
  end
72
76
 
77
+
78
+ def cache_branch_name(branch_name)
79
+ @modules["branch_name"] = branch_name
80
+ cache_modules
81
+ end
82
+
83
+
73
84
  def cache_path_modules(modules, add_modules, del_modules)
74
85
  @modules["path"]["all"] = modules.uniq
75
86
  @modules["path"]["add"] = add_modules.uniq
@@ -103,7 +114,8 @@ module BigKeeper
103
114
  end
104
115
 
105
116
  def clean_modules
106
- @modules = {"git" => {"all" => [], "current" => []}, "path" => {"all" => [], "add" => [], "del" => [], "current" => []}}
117
+ branch_name = @modules["branch_name"]
118
+ @modules = {"git" => {"all" => [], "current" => []}, "path" => {"all" => [], "add" => [], "del" => [], "current" => []},"branch_name" => branch_name}
107
119
  cache_modules
108
120
  end
109
121
 
@@ -1,3 +1,3 @@
1
1
  module BigKeeper
2
- VERSION = "3.0.5"
2
+ VERSION = "3.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kookeeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - mmoaay