ebm 0.0.32 → 0.0.33

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- data.tar.gz: c73999654884f1cc03767f59c73611a2e7426d89
4
- metadata.gz: c0ced619f5588c020f01e9567e83996a90f19848
3
+ data.tar.gz: 992915ca9318b3a1771ac408a516e1aff08c4d3e
4
+ metadata.gz: 31e420ce369332e349abb147f778cdad71cbac14
5
5
  SHA512:
6
- data.tar.gz: ddfc18f5627cc351680ec04c7ec50dc254f7050b2299ebfe9d058547e2df73a0b8f8714cade75fde4e08d7bf187c52dbee489ed61f4ee4ac47186edf75c8b3d0
7
- metadata.gz: c1324a1f7987367a73e7678fd30b4b31f2af2c51b47be6e74a4b7b33030166c966009c35312207f815571351534f7622e9b98f9e57e6686a6fc029497c42f36f
6
+ data.tar.gz: a8330e7c3981e410f9751f2a3ef24daaf410ec3c5d3c68490883899648a658ee1240f66562a22bc23ff6fb4d3fe78128c2b6dc90922e7904d2126b9dd84721fd
7
+ metadata.gz: 6c6d7bc01b509ae2c8e7e23c6058f18d55f108280f97346c798bbd23d3f0454209e3dd273f9d7761a9a4b85d414daf192c9a692174c408d948f015c2156c48cd
data/lib/commands/pull.rb CHANGED
@@ -73,61 +73,59 @@ module Commands
73
73
  merge_failed = false
74
74
  repos = info[:repos]
75
75
  repos.each do |repo|
76
- if repo[:create_dev_branch]
77
- repo_name = EbmSharedLib.get_repo_name(repo[:git_path])
78
- repo_path = "#{top_dir}/#{repo_name}"
79
- branch = repo[:branch]
80
- base_branch = repo[:base_branch]
76
+ repo_name = EbmSharedLib.get_repo_name(repo[:git_path])
77
+ repo_path = "#{top_dir}/#{repo_name}"
78
+ branch = repo[:branch]
79
+ base_branch = repo[:base_branch]
81
80
 
82
- puts("\n#{repo_name} pull:\n");
81
+ puts("\n#{repo_name} pull:\n");
83
82
 
84
- cmd = "git fetch #{dry_run} --all"
83
+ cmd = "git fetch #{dry_run} --all"
84
+ if EbmSharedLib::CL.do_cmd_result(cmd, repo_path) != 0
85
+ raise "Git fetch failed for #{repo_name}."
86
+ end
87
+
88
+ if tag
89
+ # use git checkout to force changes from either tag or branch
90
+ cmd = "git checkout -f refs/tags/#{tag}"
85
91
  if EbmSharedLib::CL.do_cmd_result(cmd, repo_path) != 0
86
- raise "Git fetch failed for #{repo_name}."
92
+ raise "Git checkout failed for #{repo_name}."
87
93
  end
88
-
89
- if tag
90
- # use git checkout to force changes from either tag or branch
91
- cmd = "git checkout -f refs/tags/#{tag}"
92
- if EbmSharedLib::CL.do_cmd_result(cmd, repo_path) != 0
93
- raise "Git checkout failed for #{repo_name}."
94
+ elsif repo[:create_dev_branch]
95
+ if remote_version
96
+ # pulling from remote version branch
97
+ cmd = "git pull #{dry_run} --no-edit --recurse-submodules=yes origin #{branch}"
98
+ elsif base_version
99
+ # pulling from base remote version branch
100
+ if base_branch.nil?
101
+ raise "You specified base-version but the config has no base_branch."
94
102
  end
103
+ cmd = "git pull #{dry_run} --no-edit --recurse-submodules=yes origin #{base_branch}"
95
104
  else
96
- if remote_version
97
- # pulling from remote version branch
98
- cmd = "git pull #{dry_run} --no-edit --recurse-submodules=yes origin #{branch}"
99
- elsif base_version
100
- # pulling from base remote version branch
101
- if base_branch.nil?
102
- raise "You specified base-version but the config has no base_branch."
103
- end
104
- cmd = "git pull #{dry_run} --no-edit --recurse-submodules=yes origin #{base_branch}"
105
- else
106
- # pull from the remote branch of the current branch
107
- cmd = "git pull #{dry_run} --no-edit --recurse-submodules=yes"
108
- end
109
-
110
- exit_code = EbmSharedLib::CL.do_cmd_ignore_str(cmd, "Automatic merge failed", repo_path)
111
- if exit_code != 0 && exit_code != 999
112
- raise "Git pull failed for #{repo_name}."
113
- end
114
- if exit_code == 999
115
- merge_failed = true
116
- end
105
+ # pull from the remote branch of the current branch
106
+ cmd = "git pull #{dry_run} --no-edit --recurse-submodules=yes"
117
107
  end
118
- cmd = "git submodule sync"
119
- if EbmSharedLib::CL.do_cmd_result(cmd, repo_path) != 0
120
- raise "Submodule sync for #{repo_name} failed."
121
- end
122
- if dry_run.empty?
123
- cmd = "git submodule update"
124
- else
125
- cmd = "git submodule update --no-fetch"
108
+
109
+ exit_code = EbmSharedLib::CL.do_cmd_ignore_str(cmd, "Automatic merge failed", repo_path)
110
+ if exit_code != 0 && exit_code != 999
111
+ raise "Git pull failed for #{repo_name}."
126
112
  end
127
- if EbmSharedLib::CL.do_cmd_result(cmd, repo_path) != 0
128
- raise "Updating submodules for #{repo_name} failed."
113
+ if exit_code == 999
114
+ merge_failed = true
129
115
  end
116
+ end
130
117
 
118
+ cmd = "git submodule sync"
119
+ if EbmSharedLib::CL.do_cmd_result(cmd, repo_path) != 0
120
+ raise "Submodule sync for #{repo_name} failed."
121
+ end
122
+ if dry_run.empty?
123
+ cmd = "git submodule update"
124
+ else
125
+ cmd = "git submodule update --no-fetch"
126
+ end
127
+ if EbmSharedLib::CL.do_cmd_result(cmd, repo_path) != 0
128
+ raise "Updating submodules for #{repo_name} failed."
131
129
  end
132
130
 
133
131
  end
@@ -41,14 +41,12 @@ module Commands
41
41
 
42
42
  repos = info[:repos]
43
43
  repos.each do |repo|
44
- if repo[:create_dev_branch]
45
- repo_name = EbmSharedLib.get_repo_name(repo[:git_path])
46
- repo_path = "#{top_dir}/#{repo_name}"
47
- puts("\n#{repo_name} status:\n");
48
- cmd = "git status"
49
- if EbmSharedLib::CL.do_cmd_result(cmd, repo_path) != 0
50
- raise "Git status failed for #{repo_name}. Make sure you run the command from within a top level repo directory."
51
- end
44
+ repo_name = EbmSharedLib.get_repo_name(repo[:git_path])
45
+ repo_path = "#{top_dir}/#{repo_name}"
46
+ puts("\n#{repo_name} status:\n");
47
+ cmd = "git status"
48
+ if EbmSharedLib::CL.do_cmd_result(cmd, repo_path) != 0
49
+ raise "Git status failed for #{repo_name}. Make sure you run the command from within a top level repo directory."
52
50
  end
53
51
  end
54
52
 
data/lib/info.rb CHANGED
@@ -7,6 +7,6 @@
7
7
  #
8
8
  class Info
9
9
  def self.version
10
- "0.0.32"
10
+ "0.0.33"
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.32
4
+ version: 0.0.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Seitz
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2013-08-13 00:00:00 Z
12
+ date: 2013-10-16 00:00:00 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: subcommand