reissue 0.4.10 → 0.4.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f62c8ac05132854096bc7ad4cf5b2350a7b53ca183bc8c1090beca3297f3877
4
- data.tar.gz: 18deca778dae79bca2b168c4ec759b601f1cd762f58b4e2e7b66d9b7ad9fe984
3
+ metadata.gz: 2716a8e3df4f6b34bcdaa93f2aeac3ad9ebbe46489c55181a2414bcbd2bc6e58
4
+ data.tar.gz: 8c0090f0e3aef87175c72e4847193f3eb847e0d7307fe21ae89382561cf1ee66
5
5
  SHA512:
6
- metadata.gz: 63e8a825e67c084a31560d7c09006fad20cd4387fc8ea220279e7fc4df8697ca6c4118eb1a9233cf650fe4e28c41588dad9af60384f34d9f4e4500fde9a1f791
7
- data.tar.gz: 67a8cd01e0a65e6581d6932f1bfb686e02fe131390a4aa11fa4b625345fefb075576cd7c8e4ecc7f3f55da08f4fc8f60402eb122ec84d0010be5ee864c931846
6
+ metadata.gz: 26336e98efff7be479a552d34fabb965109b23fc9e4acc92977ad090dc13813eca62759b7619e87871126164c5001903ba3c7ec85edb8e9fd794b498a7d8301c
7
+ data.tar.gz: 43e043210fd8315c6f0cd6ff8c9c7e7e85025b452e00f9c9de316baa9f31a8f39151182dbc34d875061d79f6a4d7911382f4554f6ec99a9ea37f2f31aa7fa8b1
data/CHANGELOG.md CHANGED
@@ -5,10 +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.10] - 2026-01-27
8
+ ## [0.4.11] - 2026-02-06
9
+
10
+ ### Added
11
+
12
+ - reissue:initialize task to create changelog and show setup instructions (ad4ae54)
13
+ - working_directory input for monorepo gem releases (55dea65)
14
+ - Gem integration tests for checksums in updated_paths (16b801e)
9
15
 
10
- ## [0.4.9] - 2026-01-15
16
+ ### Changed
17
+
18
+ - Replace rubygems/release-gem action with explicit release steps (55dea65)
11
19
 
12
20
  ### Fixed
13
21
 
14
- - Adding delete of remote branch after deling the local branch during the reissue:branch task to help with stale tracking reference. (3f6e1fb)
22
+ - Finalize task fails when changelog is already committed (307939e)
23
+ - Checksums not staged during finalize task (307939e)
24
+ - Stage updated_paths fails when files do not exist (16b801e)
25
+ - Release workflow fails with working-directory command not found (9068f04)
26
+
27
+ ## [0.4.10] - 2026-01-27
data/lib/reissue/rake.rb CHANGED
@@ -169,6 +169,20 @@ module Reissue
169
169
  end
170
170
  end
171
171
 
172
+ # Check if there are staged changes ready to commit.
173
+ def changes_to_commit?
174
+ _, _, status = Open3.capture3("git diff --cached --quiet")
175
+ !status.success?
176
+ end
177
+
178
+ # Stage updated_paths that exist on disk.
179
+ def stage_updated_paths
180
+ existing = updated_paths.select { |p| File.exist?(p) }
181
+ if existing.any?
182
+ run_command("git add #{existing.join(" ")}", "Failed to stage additional paths: #{existing.join(", ")}")
183
+ end
184
+ end
185
+
172
186
  def define
173
187
  desc description
174
188
  task name, [:segment] do |task, args|
@@ -186,13 +200,12 @@ module Reissue
186
200
  tasker["#{name}:clear_fragments"].invoke
187
201
 
188
202
  run_command("git add -u", "Failed to stage updated files")
189
- if updated_paths&.any?
190
- run_command("git add #{updated_paths.join(" ")}", "Failed to stage additional paths: #{updated_paths.join(", ")}")
191
- end
203
+ stage_updated_paths
192
204
 
193
205
  bump_message = "Bump version to #{new_version}"
194
206
  if commit
195
207
  if reissue_version_with_branch?
208
+ tasker["#{name}:branch"].reenable
196
209
  tasker["#{name}:branch"].invoke("reissue/#{new_version}")
197
210
  end
198
211
  run_command("git commit -m '#{bump_message}'", "Failed to commit version bump")
@@ -233,8 +246,13 @@ module Reissue
233
246
  tasker["#{name}:branch"].invoke("finalize/#{version}")
234
247
  end
235
248
  run_command("git add -u", "Failed to stage finalized changelog")
236
- run_command("git commit -m '#{finalize_message}'", "Failed to commit finalized changelog")
237
- tasker["#{name}:push"].invoke if push_finalize?
249
+ stage_updated_paths
250
+ if changes_to_commit?
251
+ run_command("git commit -m '#{finalize_message}'", "Failed to commit finalized changelog")
252
+ tasker["#{name}:push"].invoke if push_finalize?
253
+ else
254
+ puts finalize_message
255
+ end
238
256
  else
239
257
  puts finalize_message
240
258
  end
@@ -373,3 +391,75 @@ module Reissue
373
391
  end
374
392
  end
375
393
  end
394
+
395
+ # Define the reissue:initialize task as a standalone task
396
+ # This works without any configuration, allowing users to bootstrap their project
397
+ namespace :reissue do
398
+ desc "Initialize reissue by creating a CHANGELOG.md and showing Rakefile configuration"
399
+ task :initialize do
400
+ changelog_file = "CHANGELOG.md"
401
+
402
+ if File.exist?(changelog_file)
403
+ puts "✓ #{changelog_file} already exists"
404
+ else
405
+ Reissue.generate_changelog(changelog_file)
406
+ puts "✓ Created #{changelog_file}"
407
+ end
408
+
409
+ puts
410
+ puts "Add the following to your Rakefile to enable reissue tasks:"
411
+ puts
412
+ puts <<~RAKEFILE
413
+ require "reissue/rake"
414
+
415
+ Reissue::Task.create :reissue do |task|
416
+ task.version_file = "lib/your_gem/version.rb" # Required: path to your VERSION constant
417
+ end
418
+ RAKEFILE
419
+
420
+ puts
421
+ puts "Optional configuration:"
422
+ puts
423
+ puts <<~OPTIONS
424
+ Reissue::Task.create :reissue do |task|
425
+ task.version_file = "lib/your_gem/version.rb"
426
+
427
+ # Changelog options
428
+ task.changelog_file = "CHANGELOG.md" # Default: "CHANGELOG.md"
429
+ task.version_limit = 2 # Versions to keep in changelog
430
+
431
+ # Fragment handling for changelog entries
432
+ task.fragment = :git # Use git commit trailers (Added:, Fixed:, etc.)
433
+ # task.fragment = "changelog_fragments" # Or use a directory of fragment files
434
+ task.clear_fragments = false # Clear fragment files after release. Not necessary when using git trailers.
435
+
436
+ # Git workflow options
437
+ task.commit = true # Auto-commit version bumps
438
+ task.commit_finalize = true # Auto-commit changelog finalization
439
+ task.push_reissue = :branch # Push strategy: false, true, or :branch
440
+ task.push_finalize = false # Push after finalize: false, true, or :branch
441
+
442
+ # Custom tag pattern for version detection (must include capture group)
443
+ # task.tag_pattern = /^myapp-v(\\d+\\.\\d+\\.\\d+.*)$/
444
+ end
445
+ OPTIONS
446
+
447
+ puts
448
+ puts "For Ruby gems, use reissue/gem for automatic integration with bundler tasks:"
449
+ puts
450
+ puts <<~GEM_USAGE
451
+ require "reissue/gem"
452
+
453
+ Reissue::Task.create :reissue do |task|
454
+ task.version_file = "lib/your_gem/version.rb"
455
+ task.fragment = :git
456
+ end
457
+ GEM_USAGE
458
+
459
+ puts
460
+ puts "This automatically runs reissue:bump and reissue:finalize before `rake build`"
461
+ puts "and runs reissue after `rake release`."
462
+ puts
463
+ puts "Run `rake -T reissue` to see all available tasks after configuration."
464
+ end
465
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Reissue
4
- VERSION = "0.4.10"
4
+ VERSION = "0.4.11"
5
5
  end
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.10
4
+ version: 0.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Gay