reissue 0.4.6 → 0.4.7
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -9
- data/lib/reissue/rake.rb +27 -11
- data/lib/reissue/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 497ea9bf5abf5081d1177217a0083ad682edf5d39ed7c729e8949c31e47e1d53
|
|
4
|
+
data.tar.gz: 0c4660c3d271b95fcbc0575bf91a0826a91348d6b48ac383a5ab9058887afdf3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8dcd012366336939860c89e503526a2d46879159ab7e10c9f571d3157142ffe613d2b641da75b67359bd8fa49af8dc2ffd171e09df32794fe230b9da24293910
|
|
7
|
+
data.tar.gz: e90cd39f283c3bb983c24bb45f7a0c3fe2b6519d650adc411c9c0e69572eba8b59535935aabc9e225cb04f70da7401ed99dd74f151ef513b112bd1f494ea2e03
|
data/CHANGELOG.md
CHANGED
|
@@ -5,23 +5,23 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
7
7
|
|
|
8
|
-
## [0.4.
|
|
8
|
+
## [0.4.7] - 2025-12-10
|
|
9
9
|
|
|
10
|
-
###
|
|
10
|
+
### Fixed
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
12
|
+
- Git command failures now raise detailed errors with full output (d87ffd3)
|
|
13
|
+
- Bundle install skipped when no Gemfile exists in directory (d87ffd3)
|
|
14
|
+
- Changelog file configuration ignored in reissue task (35b5a30)
|
|
15
15
|
|
|
16
|
-
###
|
|
16
|
+
### Added
|
|
17
17
|
|
|
18
|
-
-
|
|
18
|
+
- Error messages include command, exit status, stdout, and stderr (d87ffd3)
|
|
19
19
|
|
|
20
20
|
### Changed
|
|
21
21
|
|
|
22
|
-
-
|
|
22
|
+
- All critical git operations now use comprehensive error checking (d87ffd3)
|
|
23
23
|
|
|
24
|
-
## [0.4.
|
|
24
|
+
## [0.4.6] - 2025-12-05
|
|
25
25
|
|
|
26
26
|
### Added
|
|
27
27
|
|
|
@@ -32,3 +32,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
32
32
|
### Fixed
|
|
33
33
|
|
|
34
34
|
- Duplicate changelog entries with incorrect release dates. (1e03b68)
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- Branch naming convention to use distinct prefixes for finalize vs reissue (d1add14)
|
data/lib/reissue/rake.rb
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "rake/tasklib"
|
|
4
|
+
require "open3"
|
|
4
5
|
require_relative "../reissue"
|
|
5
6
|
|
|
6
7
|
module Reissue
|
|
@@ -114,6 +115,20 @@ module Reissue
|
|
|
114
115
|
attr_reader :formatter, :tasker
|
|
115
116
|
private :formatter, :tasker
|
|
116
117
|
|
|
118
|
+
# Run a shell command and raise an error with details if it fails
|
|
119
|
+
def run_command(command, error_message)
|
|
120
|
+
stdout, stderr, status = Open3.capture3(command)
|
|
121
|
+
unless status.success?
|
|
122
|
+
error_details = [error_message]
|
|
123
|
+
error_details << "Command: #{command}"
|
|
124
|
+
error_details << "Exit status: #{status.exitstatus}"
|
|
125
|
+
error_details << "STDOUT: #{stdout.strip}" unless stdout.strip.empty?
|
|
126
|
+
error_details << "STDERR: #{stderr.strip}" unless stderr.strip.empty?
|
|
127
|
+
raise error_details.join("\n")
|
|
128
|
+
end
|
|
129
|
+
stdout
|
|
130
|
+
end
|
|
131
|
+
|
|
117
132
|
def finalize_with_branch?
|
|
118
133
|
push_finalize == :branch
|
|
119
134
|
end
|
|
@@ -131,7 +146,7 @@ module Reissue
|
|
|
131
146
|
end
|
|
132
147
|
|
|
133
148
|
def bundle
|
|
134
|
-
if defined?(Bundler)
|
|
149
|
+
if defined?(Bundler) && File.exist?("Gemfile")
|
|
135
150
|
Bundler.with_unbundled_env do
|
|
136
151
|
system("bundle install")
|
|
137
152
|
end
|
|
@@ -145,6 +160,7 @@ module Reissue
|
|
|
145
160
|
new_version = formatter.call(
|
|
146
161
|
segment:,
|
|
147
162
|
version_file:,
|
|
163
|
+
changelog_file:,
|
|
148
164
|
version_limit:,
|
|
149
165
|
version_redo_proc:,
|
|
150
166
|
fragment: fragment
|
|
@@ -153,9 +169,9 @@ module Reissue
|
|
|
153
169
|
|
|
154
170
|
tasker["#{name}:clear_fragments"].invoke
|
|
155
171
|
|
|
156
|
-
|
|
172
|
+
run_command("git add -u", "Failed to stage updated files")
|
|
157
173
|
if updated_paths&.any?
|
|
158
|
-
|
|
174
|
+
run_command("git add #{updated_paths.join(" ")}", "Failed to stage additional paths: #{updated_paths.join(", ")}")
|
|
159
175
|
end
|
|
160
176
|
|
|
161
177
|
bump_message = "Bump version to #{new_version}"
|
|
@@ -163,7 +179,7 @@ module Reissue
|
|
|
163
179
|
if reissue_version_with_branch?
|
|
164
180
|
tasker["#{name}:branch"].invoke("reissue/#{new_version}")
|
|
165
181
|
end
|
|
166
|
-
|
|
182
|
+
run_command("git commit -m '#{bump_message}'", "Failed to commit version bump")
|
|
167
183
|
tasker["#{name}:push"].invoke if push_reissue?
|
|
168
184
|
else
|
|
169
185
|
system("echo '#{bump_message}'")
|
|
@@ -200,8 +216,8 @@ module Reissue
|
|
|
200
216
|
# Use "finalize/" prefix for the version being released
|
|
201
217
|
tasker["#{name}:branch"].invoke("finalize/#{version}")
|
|
202
218
|
end
|
|
203
|
-
|
|
204
|
-
|
|
219
|
+
run_command("git add -u", "Failed to stage finalized changelog")
|
|
220
|
+
run_command("git commit -m '#{finalize_message}'", "Failed to commit finalized changelog")
|
|
205
221
|
tasker["#{name}:push"].invoke if push_finalize?
|
|
206
222
|
else
|
|
207
223
|
system("echo '#{finalize_message}'")
|
|
@@ -224,14 +240,14 @@ module Reissue
|
|
|
224
240
|
# Delete matching tag if it exists
|
|
225
241
|
system("git tag -d v#{version} 2>/dev/null || true")
|
|
226
242
|
# Delete the branch
|
|
227
|
-
|
|
243
|
+
run_command("git branch -D #{branch_name}", "Failed to delete existing branch #{branch_name}")
|
|
228
244
|
end
|
|
229
|
-
|
|
245
|
+
run_command("git checkout -b #{branch_name}", "Failed to create and checkout branch #{branch_name}")
|
|
230
246
|
end
|
|
231
247
|
|
|
232
248
|
desc "Push the current branch to the remote repository."
|
|
233
249
|
task "#{name}:push" do
|
|
234
|
-
|
|
250
|
+
run_command("git push origin HEAD", "Failed to push to remote repository")
|
|
235
251
|
end
|
|
236
252
|
|
|
237
253
|
desc "Preview changelog entries that will be added from fragments or git trailers"
|
|
@@ -288,8 +304,8 @@ module Reissue
|
|
|
288
304
|
formatter.clear_fragments(fragment)
|
|
289
305
|
clear_message = "Clear changelog fragments"
|
|
290
306
|
if commit_clear_fragments
|
|
291
|
-
|
|
292
|
-
|
|
307
|
+
run_command("git add #{fragment}", "Failed to stage cleared fragments")
|
|
308
|
+
run_command("git commit -m '#{clear_message}'", "Failed to commit cleared fragments")
|
|
293
309
|
else
|
|
294
310
|
system("echo '#{clear_message}'")
|
|
295
311
|
end
|
data/lib/reissue/version.rb
CHANGED