Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo-tools: add generate-patch command #27331

Merged
merged 6 commits into from
Oct 24, 2024
Merged

repo-tools: add generate-patch command #27331

merged 6 commits into from
Oct 24, 2024

Conversation

Rugvip
Copy link
Member

@Rugvip Rugvip commented Oct 24, 2024

Hey, I just made a Pull Request!

This adds a new generate-patch command to @backstage/repo-tools. The purpose of it is to simplify the process of contributing changes to an external repo, but then also use those changes immediately. It automates the process of running building the package, packing it to a folder, applying those changes to a directory created with yarn patch, and then applying that patch and removing the old ones. The automated process is slightly different than than in that it uses a downloaded version of the package as the base, but it ends up being effectively the same thing - you bring the current code in one project into another.

I chose to nudge the behavior of this in the direction of including all changes to the package in the source workspace, rather than cherry-picking individual changes. The idea is that this makes it simpler to manage multiple patched changes at once, since you end up with all the current changes to the package. It's of course possible to create a new branch based on the previous release and cherry-pick only the desired changes though.

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
@Rugvip Rugvip requested review from backstage-service and a team as code owners October 24, 2024 07:31
@Rugvip Rugvip requested review from freben and camilaibs October 24, 2024 07:31
@github-actions github-actions bot added the area:documentation Improvements or additions to documentation label Oct 24, 2024
@backstage-goalie
Copy link
Contributor

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage/repo-tools packages/repo-tools patch v0.11.0-next.0

Rugvip and others added 3 commits October 24, 2024 11:49
Co-authored-by: Ben Lambert <blam@spotify.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Copy link
Member

@freben freben left a comment

Choose a reason for hiding this comment

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

Great stuff!

Rugvip and others added 2 commits October 24, 2024 17:14
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
@Rugvip Rugvip enabled auto-merge October 24, 2024 15:24
@Rugvip Rugvip merged commit 1d1191d into master Oct 24, 2024
31 checks passed
@Rugvip Rugvip deleted the rugvip/genpatch branch October 24, 2024 15:29
Copy link
Contributor

Thank you for contributing to Backstage! The changes in this pull request will be part of the 1.33.0 release, scheduled for Tue, 19 Nov 2024.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants