git-version-bump 0.18.0.9.gdf2ea32 → 0.18.0.13.gc1af65c

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/git-version-bump.rb +10 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79a1a1154525f5c0f50020261fba1e295f985e3d2264335420b060c2c55a352b
4
- data.tar.gz: c4aa9cfd65980d0d1024daf8806b4831acd8056d1a315d1c562e80fb87a58f9b
3
+ metadata.gz: 401c8af39ee5870527618010dfaf9d40942dadf75be49d8aff1052068f26e05b
4
+ data.tar.gz: '050811bc1eecc11587c369fe2d1ad48d8f51291127cfd989d23202dca5758e67'
5
5
  SHA512:
6
- metadata.gz: eec061ff61f4a8e4e26c8b8bb119cbd3414d1015b79fd1649fb8307422dcd43e6deb5b392adb3be1ff21097fc85f41d582f99919b5ddf2d0926479bc2ee4bae8
7
- data.tar.gz: 59661e2dbace2392afd6be097d399ac908cec1a6cbd3214bf57cf618d8a7530990fb59cd59199985f32bffcbe8b616077fd79ba67250150236cf225f2ee7bb51
6
+ metadata.gz: 388a339b6f4c4b12bab2294e7fd8c912c5385d50fcb26a504b1dd1266151eb7a34a9ebdccdca4c26cd2a508e898265d5a5389f46b0d56674761349214abfc933
7
+ data.tar.gz: 227415d087e67252ab3a89c655b2b1ffdb23b384f010b9355fa69f3a6f6b18e865764348cbed7a64ad4e949afa6b54ccc14a69b05d1dd82fa3dc25a5e16be890
@@ -106,7 +106,7 @@ module GitVersionBump
106
106
  log_file.close
107
107
 
108
108
  pre_hash = Digest::SHA1.hexdigest(File.read(log_file.path))
109
- run_command(["git", "config", "-e", "-f", log_file.path], "editing release notes")
109
+ run_command(["git", "config", "-e", "-f", log_file.path], "editing release notes", false)
110
110
  if Digest::SHA1.hexdigest(File.read(log_file.path)) == pre_hash
111
111
  puts "Release notes not edited; not making release"
112
112
  log_file.unlink
@@ -198,10 +198,10 @@ module GitVersionBump
198
198
 
199
199
  # Execute a command, specified as an array.
200
200
  #
201
- # On success, the full output of the command (stdout+stderr, interleaved) is returned.
201
+ # On success, the full output of the command (stdout+stderr, interleaved) is returned unless capture_output is not true.
202
202
  # On error, a `CommandFailure` exception is raised.
203
203
  #
204
- def self.run_command(cmd, desc)
204
+ def self.run_command(cmd, desc, capture_output = true)
205
205
  unless cmd.is_a?(Array)
206
206
  raise ArgumentError, "Must pass command line arguments in an array"
207
207
  end
@@ -214,7 +214,13 @@ module GitVersionBump
214
214
  p :GVB_CMD, desc, cmd
215
215
  end
216
216
 
217
- out, status = Open3.capture2e({"LC_MESSAGES" => "C"}, *cmd)
217
+ if capture_output == true
218
+ out, status = Open3.capture2e({"LC_MESSAGES" => "C"}, *cmd)
219
+ else
220
+ out = '(output not captured)'
221
+ pid = spawn(*cmd)
222
+ (retpid, status) = Process.wait2 pid
223
+ end
218
224
 
219
225
  if status.exitstatus != 0
220
226
  raise CommandFailure.new("Failed while #{desc}", out, status.exitstatus)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-version-bump
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0.9.gdf2ea32
4
+ version: 0.18.0.13.gc1af65c
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Palmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-12 00:00:00.000000000 Z
11
+ date: 2023-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-release