Skip to content

fix(tombstone-library): generate Rakefile for release builds - #453

Open
torreypayne wants to merge 3 commits into
mainfrom
fix/tombstone-library-rakefile
Open

fix(tombstone-library): generate Rakefile for release builds#453
torreypayne wants to merge 3 commits into
mainfrom
fix/tombstone-library-rakefile

Conversation

@torreypayne

@torreypayne torreypayne commented Aug 11, 2026

Copy link
Copy Markdown
Member

When tombstoning a library using toys tombstone-library, all existing files in the gem directory are purged and replaced with a minimal tombstone skeleton (README.md, LICENSE.md, .gemspec, .yardopts, version.rb). However, the tool previously omitted a Rakefile, leading to errors when releasing the tombstoned version of the package.

Context & Failure Mode

During the recent tombstoning of the stackdriver gem (googleapis/google-cloud-ruby#34614), automated release packaging via release-please (triggered on tag stackdriver/v1.0.0) failed in the release CI/CD workflow with:

rake aborted!
Don't know how to build task 'build' (See the list of available tasks with `rake --tasks`)

Because release packaging automation relies on executing bundle exec rake build to compile the .gem artifact prior to RubyGems publication, the absence of a Rakefile invoking bundler/gem_tasks aborted the release pipeline. We had to manually push a follow-up patch PR (googleapis/google-cloud-ruby#34652) to restore a minimal Rakefile, which caused release tag collisions and required manual changelog fixes.

Changes

  • Adds toys/tombstone-library/.data/rakefile-template.erb containing the standard license header, require "bundler/setup", and require "bundler/gem_tasks".
  • Updates generate_files in toys/tombstone-library/.toys.rb to generate Rakefile automatically when tombstoning any library.

Downstream Reference

Tested and validated downstream against the Apigee Registry tombstone draft PR: googleapis/google-cloud-ruby#36233.

@torreypayne
torreypayne requested a review from a team as a code owner August 11, 2026 22:38
@torreypayne torreypayne changed the title fix(tombstone-library): generate Rakefile with bundler gem_tasks for release build fix(tombstone-library): generate Rakefile for release builds Aug 11, 2026
@@ -0,0 +1,18 @@
# frozen_string_literal: true

# Copyright <%= cur_year %> Google LLC

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cur_year. Does this work? Otherwise, LGTM! I will ping you with a suggestion for testing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something like this can work: https://github.com/googleapis/gapic-generator-ruby/blob/cf7b51a224feacfbe2a187cad412824fdb7a48d2/gapic-generator-ads/templates/ads/shared/_license.text.erb#L1

No need to spend tons of time testing this btw! It is pretty isolated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants