Unverified Commit e2c03491 authored by Stanislav Baranov's avatar Stanislav Baranov Committed by GitHub

Add logic for creating rollback dynamic patches. (#26312)

Before this change, rolling back a patch relied on deleting the patch
file from the server completely. This PR implements a more reliable
approach where developer needs to create a physical rollback patch file.
This is more robust to mistakenly taking down a patch from user devices.
parent c486bdb6
......@@ -479,13 +479,7 @@ Future<void> _buildGradleProjectV2(
}
if (update.files.isEmpty) {
printStatus('No changes detected relative to baseline build.');
if (updateFile.existsSync()) {
updateFile.deleteSync();
printStatus('Deleted dynamic patch ${updateFile.path}.');
}
return;
printStatus('No changes detected, creating rollback patch.');
}
final ArchiveFile oldFile = oldApk.findFile('assets/flutter_assets/isolate_snapshot_data');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment