diff --git a/engine/src/flutter/sky/tools/roll/android_build.patch b/engine/src/flutter/sky/tools/roll/patches/chromium/android_build.patch similarity index 100% rename from engine/src/flutter/sky/tools/roll/android_build.patch rename to engine/src/flutter/sky/tools/roll/patches/chromium/android_build.patch diff --git a/engine/src/flutter/sky/tools/roll/mojo_dart_embedder.patch b/engine/src/flutter/sky/tools/roll/patches/mojo/mojo_dart_embedder.patch similarity index 100% rename from engine/src/flutter/sky/tools/roll/mojo_dart_embedder.patch rename to engine/src/flutter/sky/tools/roll/patches/mojo/mojo_dart_embedder.patch diff --git a/engine/src/flutter/sky/tools/roll/roll.py b/engine/src/flutter/sky/tools/roll/roll.py index d72b026fb9..282f4aa44f 100755 --- a/engine/src/flutter/sky/tools/roll/roll.py +++ b/engine/src/flutter/sky/tools/roll/roll.py @@ -128,14 +128,23 @@ def main(): args = parser.parse_args() + patches_dir = os.path.join(args.dest_dir, 'sky', 'tools', 'roll', 'patches') + if args.mojo_dir: rev(args.mojo_dir, args.dest_dir, dirs_from_mojo, 'mojo') + try: + patch.patch_and_filter(os.path.join(patches_dir, 'mojo')) + except subprocess.CalledProcessError: + print "ERROR: Roll failed due to a patch not applying" + print "Fix the patch to apply, commit the result, and re-run this script" + return 1 + if args.chromium_dir: rev(args.chromium_dir, args.dest_dir, dirs_from_chromium, 'chromium') try: - patch.patch_and_filter(args.dest_dir) + patch.patch_and_filter(os.path.join(patches_dir, 'chromium')) except subprocess.CalledProcessError: print "ERROR: Roll failed due to a patch not applying" print "Fix the patch to apply, commit the result, and re-run this script"