git-version-bump 0.18.0.9.gdf2ea32 → 0.18.0.13.gc1af65c
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/git-version-bump.rb +10 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 401c8af39ee5870527618010dfaf9d40942dadf75be49d8aff1052068f26e05b
|
4
|
+
data.tar.gz: '050811bc1eecc11587c369fe2d1ad48d8f51291127cfd989d23202dca5758e67'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 388a339b6f4c4b12bab2294e7fd8c912c5385d50fcb26a504b1dd1266151eb7a34a9ebdccdca4c26cd2a508e898265d5a5389f46b0d56674761349214abfc933
|
7
|
+
data.tar.gz: 227415d087e67252ab3a89c655b2b1ffdb23b384f010b9355fa69f3a6f6b18e865764348cbed7a64ad4e949afa6b54ccc14a69b05d1dd82fa3dc25a5e16be890
|
data/lib/git-version-bump.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
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.
|
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-
|
11
|
+
date: 2023-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github-release
|