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.
- checksums.yaml +4 -4
- data/lib/git-version-bump.rb +10 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6b89065c124d3880940d286e02a6019339126e61dbf0e87dea09dfc7beb2107
|
4
|
+
data.tar.gz: d99b30535de16366c92b332a37b9cc3682540b7e861da5582ce4b850a3cf645c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6a4ab696eba86296db5d49496a4786c8536eae960e6bf333aeaed9ba3b0608b945e867318b87409448b84d0054cd23070a29fd33b17815c43536ecc70b5ca78
|
7
|
+
data.tar.gz: 877d4cda898df80e87dcaf7d7026e6386d64c2adf56131dca779b779fe8da1ef3224103316aa9289d8a8975d4dead1340852be4f36b984c288405cdea0bb74f6
|
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.
|
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-
|
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:
|
104
|
+
version: '0'
|
105
105
|
requirements: []
|
106
106
|
rubygems_version: 3.1.6
|
107
107
|
signing_key:
|