ebm 0.0.31 → 0.0.32

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
- SHA512:
3
- data.tar.gz: 0927051ba0c2822880b2647d82f2114b1be434f67d675e7dcd764a3732d3b9c238b78ce9e157dce7d2b5a7fbb37d0d49ebf7e2d67c09dfb4327d0c2a0d423177
4
- metadata.gz: e4699f07b8cb4364a580e804f88beb925d5955ddde2bfd8daae1eeb28e1eedd70b5d5d0f153aba6c54adfac097609601db6ea783748e3e12c9b398b94e48fe03
5
2
  SHA1:
6
- data.tar.gz: b7adab478d1434f25025c99ed8c3c99b2afdaa38
7
- metadata.gz: 6ec993882cfb9e3d7af2deee2d30ac7e1bac9cf8
3
+ data.tar.gz: c73999654884f1cc03767f59c73611a2e7426d89
4
+ metadata.gz: c0ced619f5588c020f01e9567e83996a90f19848
5
+ SHA512:
6
+ data.tar.gz: ddfc18f5627cc351680ec04c7ec50dc254f7050b2299ebfe9d058547e2df73a0b8f8714cade75fde4e08d7bf187c52dbee489ed61f4ee4ac47186edf75c8b3d0
7
+ metadata.gz: c1324a1f7987367a73e7678fd30b4b31f2af2c51b47be6e74a4b7b33030166c966009c35312207f815571351534f7622e9b98f9e57e6686a6fc029497c42f36f
@@ -78,15 +78,9 @@ module Commands
78
78
  end
79
79
 
80
80
  cmd = "git commit #{dry_run} -am \"#{comment}\""
81
- msg = EbmSharedLib::CL.do_cmd_output(cmd, repo_path)
82
- puts msg
83
- exit_code = $?.exitstatus
84
- if exit_code != 0
85
- line = msg.split("\n").last # last line
86
- # ugly hack to not show as error when nothing to commit
87
- if !line.include?("nothing to commit")
81
+ exit_code = EbmSharedLib::CL.do_cmd_ignore_str(cmd, "nothing to commit", repo_path)
82
+ if exit_code != 0 && exit_code != 999
88
83
  raise "Git commit failed for #{repo_name}."
89
- end
90
84
  end
91
85
  end
92
86
  end
data/lib/commands/pull.rb CHANGED
@@ -70,6 +70,7 @@ module Commands
70
70
  # Back up to version parent dir. This directory contains the top level repos.
71
71
  top_dir = Dir.pwd
72
72
 
73
+ merge_failed = false
73
74
  repos = info[:repos]
74
75
  repos.each do |repo|
75
76
  if repo[:create_dev_branch]
@@ -105,9 +106,14 @@ module Commands
105
106
  # pull from the remote branch of the current branch
106
107
  cmd = "git pull #{dry_run} --no-edit --recurse-submodules=yes"
107
108
  end
108
- if EbmSharedLib::CL.do_cmd_result(cmd, repo_path) != 0
109
+
110
+ exit_code = EbmSharedLib::CL.do_cmd_ignore_str(cmd, "Automatic merge failed", repo_path)
111
+ if exit_code != 0 && exit_code != 999
109
112
  raise "Git pull failed for #{repo_name}."
110
113
  end
114
+ if exit_code == 999
115
+ merge_failed = true
116
+ end
111
117
  end
112
118
  cmd = "git submodule sync"
113
119
  if EbmSharedLib::CL.do_cmd_result(cmd, repo_path) != 0
@@ -121,7 +127,13 @@ module Commands
121
127
  if EbmSharedLib::CL.do_cmd_result(cmd, repo_path) != 0
122
128
  raise "Updating submodules for #{repo_name} failed."
123
129
  end
130
+
124
131
  end
132
+
133
+ end
134
+
135
+ if merge_failed
136
+ raise "Automatic merge failed, you must hand merge the conflicts"
125
137
  end
126
138
 
127
139
  end
@@ -66,6 +66,22 @@ module EbmSharedLib
66
66
  result
67
67
  end
68
68
 
69
+ # run a command and don't consider it an error
70
+ # if output contains string
71
+ def self.do_cmd_ignore_str(cmd, ok_match, dir=nil)
72
+ msg = EbmSharedLib::CL.do_cmd_output(cmd, dir)
73
+ puts msg
74
+ exit_code = $?.exitstatus
75
+ if exit_code != 0
76
+ line = msg.split("\n").last # last line
77
+ # ugly hack to not show as error when nothing to commit
78
+ if line.include?(ok_match)
79
+ exit_code = 999
80
+ end
81
+ end
82
+ exit_code
83
+ end
84
+
69
85
  end
70
86
 
71
87
  def self.get_config_repo_url(config_repo)
data/lib/info.rb CHANGED
@@ -7,6 +7,6 @@
7
7
  #
8
8
  class Info
9
9
  def self.version
10
- "0.0.31"
10
+ "0.0.32"
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.31
4
+ version: 0.0.32
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-09 00:00:00 Z
12
+ date: 2013-08-13 00:00:00 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: subcommand