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

feat(shorebird_cli): alert user of non-patchable changes #538

Merged
merged 13 commits into from
May 24, 2023

Conversation

bryanoltman
Copy link
Contributor

@bryanoltman bryanoltman commented May 24, 2023

Description

Updates shorebird patch to compare the contents of the aab generated during the patch build with the contents of the aab generated by the corresponding release.

When a native code change is detected (i.e., a change to a .dex file), the patch command fails.
When an asset change is detected, the patch command warns the user and asks if they are sure they want to continue.

Fixes #385

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

Set<AabDifferences> aabContentDifferences(String aabPath1, String aabPath2) {
final fileDifferences = aabFileDifferences(aabPath1, aabPath2);

final hasAssetChanges = fileDifferences.any((file) {
Copy link
Contributor

Choose a reason for hiding this comment

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

minor but could we refactor to loop through the files once to determine what has changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated this code since this comment was written, but as it stands now, I worry that we'd losing quite a bit of readability for a negligible performance improvement. Happy to be shown otherwise though!

@felangel felangel mentioned this pull request May 24, 2023
Copy link
Contributor

@felangel felangel left a comment

Choose a reason for hiding this comment

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

LGTM ✅

@bryanoltman bryanoltman merged commit f3999fd into main May 24, 2023
5 checks passed
@bryanoltman bryanoltman deleted the bo/detect-non-dart-changes branch May 24, 2023 21:44
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.

feat: shorebird should detect/warn about non-dart app changes
3 participants