Automatically apply patches for mojo and chromium rolls

This commit is contained in:
John McCutchan
2015-07-30 10:46:31 -07:00
parent 944673e515
commit eac6fe4362
3 changed files with 10 additions and 1 deletions

View File

@@ -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"