ci: auto-3way patches and detect changes (#22976)
This commit is contained in:
parent
fd3488f0bf
commit
29f773e008
23 changed files with 282 additions and 220 deletions
31
script/export_all_patches.py
Normal file
31
script/export_all_patches.py
Normal file
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
from lib import git
|
||||
|
||||
|
||||
def export_patches(dirs):
|
||||
for patch_dir, repo in dirs.iteritems():
|
||||
git.export_patches(repo=repo, out_dir=patch_dir)
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(description='Export Electron patches')
|
||||
parser.add_argument('config', nargs='+',
|
||||
type=argparse.FileType('r'),
|
||||
help='patches\' config(s) in the JSON format')
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main():
|
||||
configs = parse_args().config
|
||||
for config_json in configs:
|
||||
export_patches(json.load(config_json))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue