reissue 0.4.5 → 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 +18 -21
- data/lib/reissue/fragment_handler/git_fragment_handler.rb +17 -4
- data/lib/reissue/rake.rb +29 -12
- 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,37 +5,34 @@ 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.
|
|
9
|
-
|
|
10
|
-
### Added
|
|
11
|
-
|
|
12
|
-
- NOTIFY_APP_NAME ENV var for CI runs in 5700751d (e2c75ff)
|
|
13
|
-
- Support for alphanumery patch version tag matching in 5c17ce36 (e2c75ff)
|
|
14
|
-
- Info in the README about adding trailers in development of Reissue (68117e0)
|
|
8
|
+
## [0.4.7] - 2025-12-10
|
|
15
9
|
|
|
16
10
|
### Fixed
|
|
17
11
|
|
|
18
|
-
-
|
|
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
|
+
|
|
16
|
+
### Added
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
- Error messages include command, exit status, stdout, and stderr (d87ffd3)
|
|
21
19
|
|
|
22
20
|
### Changed
|
|
23
21
|
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
- All critical git operations now use comprehensive error checking (d87ffd3)
|
|
23
|
+
|
|
24
|
+
## [0.4.6] - 2025-12-05
|
|
27
25
|
|
|
28
26
|
### Added
|
|
29
27
|
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
- Release flow integration documentation and verification tests (e038230)
|
|
34
|
-
- Version bumping documentation to README.md (4f2a254)
|
|
35
|
-
- Version trailer examples and usage guide (4f2a254)
|
|
36
|
-
- PR comments showing code coverage percentage and threshold status (bfa4619)
|
|
37
|
-
- ChatNotifier to update slack about CI runs (55dfeb8)
|
|
28
|
+
- NOTIFY_APP_NAME ENV var for CI runs in 5700751d (e2c75ff)
|
|
29
|
+
- Support for alphanumery patch version tag matching in 5c17ce36 (e2c75ff)
|
|
30
|
+
- Info in the README about adding trailers in development of Reissue (68117e0)
|
|
38
31
|
|
|
39
32
|
### Fixed
|
|
40
33
|
|
|
41
|
-
-
|
|
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)
|
|
@@ -119,16 +119,29 @@ module Reissue
|
|
|
119
119
|
commits.each do |commit|
|
|
120
120
|
sha = commit[:sha]
|
|
121
121
|
message = commit[:message]
|
|
122
|
+
lines = message.lines
|
|
122
123
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
line =
|
|
126
|
-
|
|
124
|
+
i = 0
|
|
125
|
+
while i < lines.length
|
|
126
|
+
line = lines[i].rstrip
|
|
127
|
+
i += 1
|
|
128
|
+
next if line.strip.empty?
|
|
127
129
|
|
|
128
130
|
if (match = line.match(TRAILER_REGEX))
|
|
129
131
|
section_name = normalize_section_name(match[1])
|
|
130
132
|
trailer_value = match[2].strip
|
|
131
133
|
|
|
134
|
+
# Collect continuation lines (non-empty lines that don't start a new changelog trailer)
|
|
135
|
+
while i < lines.length
|
|
136
|
+
next_line = lines[i].rstrip
|
|
137
|
+
# Stop at empty line or another changelog trailer
|
|
138
|
+
break if next_line.strip.empty?
|
|
139
|
+
break if next_line.match(TRAILER_REGEX)
|
|
140
|
+
|
|
141
|
+
trailer_value += " #{next_line.strip}"
|
|
142
|
+
i += 1
|
|
143
|
+
end
|
|
144
|
+
|
|
132
145
|
result[section_name] ||= []
|
|
133
146
|
# Append the short SHA in parentheses
|
|
134
147
|
result[section_name] << "#{trailer_value} (#{sha})"
|
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}'")
|
|
@@ -197,10 +213,11 @@ module Reissue
|
|
|
197
213
|
finalize_message = "Finalize the changelog for version #{version} on #{date}"
|
|
198
214
|
if commit_finalize
|
|
199
215
|
if finalize_with_branch?
|
|
200
|
-
|
|
216
|
+
# Use "finalize/" prefix for the version being released
|
|
217
|
+
tasker["#{name}:branch"].invoke("finalize/#{version}")
|
|
201
218
|
end
|
|
202
|
-
|
|
203
|
-
|
|
219
|
+
run_command("git add -u", "Failed to stage finalized changelog")
|
|
220
|
+
run_command("git commit -m '#{finalize_message}'", "Failed to commit finalized changelog")
|
|
204
221
|
tasker["#{name}:push"].invoke if push_finalize?
|
|
205
222
|
else
|
|
206
223
|
system("echo '#{finalize_message}'")
|
|
@@ -223,14 +240,14 @@ module Reissue
|
|
|
223
240
|
# Delete matching tag if it exists
|
|
224
241
|
system("git tag -d v#{version} 2>/dev/null || true")
|
|
225
242
|
# Delete the branch
|
|
226
|
-
|
|
243
|
+
run_command("git branch -D #{branch_name}", "Failed to delete existing branch #{branch_name}")
|
|
227
244
|
end
|
|
228
|
-
|
|
245
|
+
run_command("git checkout -b #{branch_name}", "Failed to create and checkout branch #{branch_name}")
|
|
229
246
|
end
|
|
230
247
|
|
|
231
248
|
desc "Push the current branch to the remote repository."
|
|
232
249
|
task "#{name}:push" do
|
|
233
|
-
|
|
250
|
+
run_command("git push origin HEAD", "Failed to push to remote repository")
|
|
234
251
|
end
|
|
235
252
|
|
|
236
253
|
desc "Preview changelog entries that will be added from fragments or git trailers"
|
|
@@ -287,8 +304,8 @@ module Reissue
|
|
|
287
304
|
formatter.clear_fragments(fragment)
|
|
288
305
|
clear_message = "Clear changelog fragments"
|
|
289
306
|
if commit_clear_fragments
|
|
290
|
-
|
|
291
|
-
|
|
307
|
+
run_command("git add #{fragment}", "Failed to stage cleared fragments")
|
|
308
|
+
run_command("git commit -m '#{clear_message}'", "Failed to commit cleared fragments")
|
|
292
309
|
else
|
|
293
310
|
system("echo '#{clear_message}'")
|
|
294
311
|
end
|
data/lib/reissue/version.rb
CHANGED