git-version-bump 0.18.0.9.gdf2ea32 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/git-version-bump.rb +10 -4
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79a1a1154525f5c0f50020261fba1e295f985e3d2264335420b060c2c55a352b
4
- data.tar.gz: c4aa9cfd65980d0d1024daf8806b4831acd8056d1a315d1c562e80fb87a58f9b
3
+ metadata.gz: a6b89065c124d3880940d286e02a6019339126e61dbf0e87dea09dfc7beb2107
4
+ data.tar.gz: d99b30535de16366c92b332a37b9cc3682540b7e861da5582ce4b850a3cf645c
5
5
  SHA512:
6
- metadata.gz: eec061ff61f4a8e4e26c8b8bb119cbd3414d1015b79fd1649fb8307422dcd43e6deb5b392adb3be1ff21097fc85f41d582f99919b5ddf2d0926479bc2ee4bae8
7
- data.tar.gz: 59661e2dbace2392afd6be097d399ac908cec1a6cbd3214bf57cf618d8a7530990fb59cd59199985f32bffcbe8b616077fd79ba67250150236cf225f2ee7bb51
6
+ metadata.gz: d6a4ab696eba86296db5d49496a4786c8536eae960e6bf333aeaed9ba3b0608b945e867318b87409448b84d0054cd23070a29fd33b17815c43536ecc70b5ca78
7
+ data.tar.gz: 877d4cda898df80e87dcaf7d7026e6386d64c2adf56131dca779b779fe8da1ef3224103316aa9289d8a8975d4dead1340852be4f36b984c288405cdea0bb74f6
@@ -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.19.0
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
@@ -99,9 +99,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
99
  version: 2.1.0
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ">"
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
- version: 1.3.1
104
+ version: '0'
105
105
  requirements: []
106
106
  rubygems_version: 3.1.6
107
107
  signing_key: