reissue 0.4.6 → 0.4.8
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 +8 -18
- data/README.md +21 -10
- data/Rakefile +2 -0
- data/lib/reissue/rake.rb +40 -17
- data/lib/reissue/version.rb +1 -1
- 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: 2f08d9caa1ad2c88dad863836f1a6bacfc6146d6d4470be14bba933ba64e3be7
|
|
4
|
+
data.tar.gz: d01ed1faae5c5cfc1c972dbc37b9512c33ffd7a1276058dd6dd681a0d7099483
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 89ba27a236b9bbd3ac28c677d98f7cb8bc37d74a1e6b41e4ad7f2d4c39c3b1a905b0c5f0a9c76ba9dfc8239257c6465f40137a9f99ecaa51740e4a7ecdd52f3b
|
|
7
|
+
data.tar.gz: 18c127dfc3f50dce363bf1346673ea54d734cc6d8fdedd30dcb72a6e49198a4ce582e5106da33f2bfee60f4c988faff78bd036324c264db454e8d73dd633496a
|
data/CHANGELOG.md
CHANGED
|
@@ -5,30 +5,20 @@ 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.8] - 2025-12-19
|
|
9
9
|
|
|
10
|
-
|
|
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)
|
|
10
|
+
## [0.4.7] - 2025-12-10
|
|
15
11
|
|
|
16
12
|
### Fixed
|
|
17
13
|
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- Branch naming convention to use distinct prefixes for finalize vs reissue (d1add14)
|
|
23
|
-
|
|
24
|
-
## [0.4.5] - 2025-11-21
|
|
14
|
+
- Git command failures now raise detailed errors with full output (d87ffd3)
|
|
15
|
+
- Bundle install skipped when no Gemfile exists in directory (d87ffd3)
|
|
16
|
+
- Changelog file configuration ignored in reissue task (35b5a30)
|
|
25
17
|
|
|
26
18
|
### Added
|
|
27
19
|
|
|
28
|
-
-
|
|
29
|
-
- Support for alphanumery patch version tag matching in 5c17ce36 (e2c75ff)
|
|
30
|
-
- Info in the README about adding trailers in development of Reissue (68117e0)
|
|
20
|
+
- Error messages include command, exit status, stdout, and stderr (d87ffd3)
|
|
31
21
|
|
|
32
|
-
###
|
|
22
|
+
### Changed
|
|
33
23
|
|
|
34
|
-
-
|
|
24
|
+
- All critical git operations now use comprehensive error checking (d87ffd3)
|
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Keep your version numbers and changelogs consistent and up-to-date with minimal
|
|
|
6
6
|
|
|
7
7
|
## Bottom Line Up Front
|
|
8
8
|
|
|
9
|
-
When releasing gems, you typically run `rake build:checksum` to build the gem and generate
|
|
9
|
+
When releasing gems, you typically run `rake build:checksum` to build the gem and generate checksums,
|
|
10
10
|
then `rake release` to push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
11
11
|
|
|
12
12
|
With Reissue, the process remains the same, but you get automatic version bumping and changelog management included.
|
|
@@ -286,25 +286,36 @@ Version trailers are case-insensitive:
|
|
|
286
286
|
|
|
287
287
|
After checking out the repo, run `bin/setup` to install dependencies. Then run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt.
|
|
288
288
|
|
|
289
|
-
|
|
289
|
+
## Automated Releases with GitHub Actions
|
|
290
290
|
|
|
291
|
-
|
|
291
|
+
### For This Gem (Reissue)
|
|
292
292
|
|
|
293
|
-
|
|
294
|
-
git commit -m "Add breaking API changes
|
|
293
|
+
Use the GitHub Actions workflow for streamlined releases:
|
|
295
294
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
295
|
+
1. Go to Actions tab in GitHub
|
|
296
|
+
2. Select "Release gem to RubyGems.org" workflow
|
|
297
|
+
3. Click "Run workflow"
|
|
298
|
+
4. The workflow will:
|
|
299
|
+
- Finalize the changelog with the release date
|
|
300
|
+
- Build and publish the gem to RubyGems.org using Trusted Publishing
|
|
301
|
+
- Create a PR with the next version bump
|
|
302
|
+
5. Merge the version bump PR to continue development
|
|
300
303
|
|
|
301
|
-
|
|
304
|
+
### For Other Gems Using Reissue
|
|
305
|
+
|
|
306
|
+
Reissue provides a shared release workflow that any gem can use. See [SHARED_WORKFLOW_README.md](.github/workflows/SHARED_WORKFLOW_README.md) for setup instructions and configuration options.
|
|
307
|
+
|
|
308
|
+
### Manual Release
|
|
309
|
+
|
|
310
|
+
For local releases (requires RubyGems API credentials configured locally, not recommended):
|
|
302
311
|
|
|
303
312
|
1. Run `rake build:checksum` to build the gem and generate checksums
|
|
304
313
|
2. Run `rake release` to push to [rubygems.org](https://rubygems.org)
|
|
305
314
|
3. The version will automatically bump and the changelog will be updated
|
|
306
315
|
4. Push the changes to the repository
|
|
307
316
|
|
|
317
|
+
The GitHub Actions workflow with Trusted Publishing is the recommended approach.
|
|
318
|
+
|
|
308
319
|
## Contributing
|
|
309
320
|
|
|
310
321
|
Bug reports and pull requests are welcome on GitHub at https://github.com/SOFware/reissue.
|
data/Rakefile
CHANGED
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
|
|
@@ -72,8 +73,14 @@ module Reissue
|
|
|
72
73
|
# Whether to commit the finalize change to the changelog. Default: true.
|
|
73
74
|
attr_accessor :commit_finalize
|
|
74
75
|
|
|
75
|
-
# Whether to commit the clear fragments change.
|
|
76
|
-
|
|
76
|
+
# Whether to commit the clear fragments change.
|
|
77
|
+
# Returns false for :git fragments since there are no files to commit.
|
|
78
|
+
attr_writer :commit_clear_fragments
|
|
79
|
+
|
|
80
|
+
def commit_clear_fragments
|
|
81
|
+
return false if fragment == :git
|
|
82
|
+
@commit_clear_fragments
|
|
83
|
+
end
|
|
77
84
|
|
|
78
85
|
# Whether to branch and push the changes. Default: :branch.
|
|
79
86
|
# Requires commit_finialize to be true.
|
|
@@ -114,6 +121,20 @@ module Reissue
|
|
|
114
121
|
attr_reader :formatter, :tasker
|
|
115
122
|
private :formatter, :tasker
|
|
116
123
|
|
|
124
|
+
# Run a shell command and raise an error with details if it fails
|
|
125
|
+
def run_command(command, error_message)
|
|
126
|
+
stdout, stderr, status = Open3.capture3(command)
|
|
127
|
+
unless status.success?
|
|
128
|
+
error_details = [error_message]
|
|
129
|
+
error_details << "Command: #{command}"
|
|
130
|
+
error_details << "Exit status: #{status.exitstatus}"
|
|
131
|
+
error_details << "STDOUT: #{stdout.strip}" unless stdout.strip.empty?
|
|
132
|
+
error_details << "STDERR: #{stderr.strip}" unless stderr.strip.empty?
|
|
133
|
+
raise error_details.join("\n")
|
|
134
|
+
end
|
|
135
|
+
stdout
|
|
136
|
+
end
|
|
137
|
+
|
|
117
138
|
def finalize_with_branch?
|
|
118
139
|
push_finalize == :branch
|
|
119
140
|
end
|
|
@@ -131,7 +152,7 @@ module Reissue
|
|
|
131
152
|
end
|
|
132
153
|
|
|
133
154
|
def bundle
|
|
134
|
-
if defined?(Bundler)
|
|
155
|
+
if defined?(Bundler) && File.exist?("Gemfile")
|
|
135
156
|
Bundler.with_unbundled_env do
|
|
136
157
|
system("bundle install")
|
|
137
158
|
end
|
|
@@ -145,6 +166,7 @@ module Reissue
|
|
|
145
166
|
new_version = formatter.call(
|
|
146
167
|
segment:,
|
|
147
168
|
version_file:,
|
|
169
|
+
changelog_file:,
|
|
148
170
|
version_limit:,
|
|
149
171
|
version_redo_proc:,
|
|
150
172
|
fragment: fragment
|
|
@@ -153,9 +175,9 @@ module Reissue
|
|
|
153
175
|
|
|
154
176
|
tasker["#{name}:clear_fragments"].invoke
|
|
155
177
|
|
|
156
|
-
|
|
178
|
+
run_command("git add -u", "Failed to stage updated files")
|
|
157
179
|
if updated_paths&.any?
|
|
158
|
-
|
|
180
|
+
run_command("git add #{updated_paths.join(" ")}", "Failed to stage additional paths: #{updated_paths.join(", ")}")
|
|
159
181
|
end
|
|
160
182
|
|
|
161
183
|
bump_message = "Bump version to #{new_version}"
|
|
@@ -163,10 +185,10 @@ module Reissue
|
|
|
163
185
|
if reissue_version_with_branch?
|
|
164
186
|
tasker["#{name}:branch"].invoke("reissue/#{new_version}")
|
|
165
187
|
end
|
|
166
|
-
|
|
188
|
+
run_command("git commit -m '#{bump_message}'", "Failed to commit version bump")
|
|
167
189
|
tasker["#{name}:push"].invoke if push_reissue?
|
|
168
190
|
else
|
|
169
|
-
|
|
191
|
+
puts bump_message
|
|
170
192
|
end
|
|
171
193
|
|
|
172
194
|
new_version
|
|
@@ -200,11 +222,11 @@ module Reissue
|
|
|
200
222
|
# Use "finalize/" prefix for the version being released
|
|
201
223
|
tasker["#{name}:branch"].invoke("finalize/#{version}")
|
|
202
224
|
end
|
|
203
|
-
|
|
204
|
-
|
|
225
|
+
run_command("git add -u", "Failed to stage finalized changelog")
|
|
226
|
+
run_command("git commit -m '#{finalize_message}'", "Failed to commit finalized changelog")
|
|
205
227
|
tasker["#{name}:push"].invoke if push_finalize?
|
|
206
228
|
else
|
|
207
|
-
|
|
229
|
+
puts finalize_message
|
|
208
230
|
end
|
|
209
231
|
end
|
|
210
232
|
|
|
@@ -224,14 +246,14 @@ module Reissue
|
|
|
224
246
|
# Delete matching tag if it exists
|
|
225
247
|
system("git tag -d v#{version} 2>/dev/null || true")
|
|
226
248
|
# Delete the branch
|
|
227
|
-
|
|
249
|
+
run_command("git branch -D #{branch_name}", "Failed to delete existing branch #{branch_name}")
|
|
228
250
|
end
|
|
229
|
-
|
|
251
|
+
run_command("git checkout -b #{branch_name}", "Failed to create and checkout branch #{branch_name}")
|
|
230
252
|
end
|
|
231
253
|
|
|
232
254
|
desc "Push the current branch to the remote repository."
|
|
233
255
|
task "#{name}:push" do
|
|
234
|
-
|
|
256
|
+
run_command("git push --force-with-lease origin HEAD", "Failed to push to remote repository")
|
|
235
257
|
end
|
|
236
258
|
|
|
237
259
|
desc "Preview changelog entries that will be added from fragments or git trailers"
|
|
@@ -284,14 +306,15 @@ module Reissue
|
|
|
284
306
|
desc "Clear fragments"
|
|
285
307
|
task "#{name}:clear_fragments" do
|
|
286
308
|
# Clear fragments after release if configured
|
|
287
|
-
|
|
309
|
+
# Only run for directory-based fragments, not :git
|
|
310
|
+
if fragment && clear_fragments && fragment.is_a?(String)
|
|
288
311
|
formatter.clear_fragments(fragment)
|
|
289
312
|
clear_message = "Clear changelog fragments"
|
|
290
313
|
if commit_clear_fragments
|
|
291
|
-
|
|
292
|
-
|
|
314
|
+
run_command("git add #{fragment}", "Failed to stage cleared fragments")
|
|
315
|
+
run_command("git commit -m '#{clear_message}'", "Failed to commit cleared fragments")
|
|
293
316
|
else
|
|
294
|
-
|
|
317
|
+
puts clear_message
|
|
295
318
|
end
|
|
296
319
|
end
|
|
297
320
|
end
|
data/lib/reissue/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: reissue
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jim Gay
|
|
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
69
|
requirements: []
|
|
70
|
-
rubygems_version: 3.7
|
|
70
|
+
rubygems_version: 3.6.7
|
|
71
71
|
specification_version: 4
|
|
72
72
|
summary: Keep your versions and changelogs up to date and prepared for release.
|
|
73
73
|
test_files: []
|