Address review comments on finalize_sdk.py
- Keep the Android.bp -- but rename to Android.bp.auto - Use 'or' instead of 'if not' Bug: 222050148 Test: Run finalize_sdk.py Merged-In: I919c3d37916d3854cd0c8d59fddb8a1420f429b9 Change-Id: I919c3d37916d3854cd0c8d59fddb8a1420f429b9
This commit is contained in:
@@ -92,9 +92,7 @@ build_target = BUILD_TARGET_TRAIN if args.bid[0] == 'T' else BUILD_TARGET_CONTIN
|
||||
branch_name = 'finalize-%d' % args.finalize_sdk
|
||||
cmdline = " ".join([x for x in sys.argv if x not in ['-a', '--amend_last_commit']])
|
||||
commit_message = COMMIT_TEMPLATE % (args.finalize_sdk, args.bid, cmdline, args.bug)
|
||||
module_names = args.modules
|
||||
if not module_names:
|
||||
module_names = ['*']
|
||||
module_names = args.modules or ['*']
|
||||
|
||||
compat_dir = COMPAT_REPO.joinpath('extensions/%d' % args.finalize_sdk)
|
||||
if compat_dir.is_dir():
|
||||
@@ -114,8 +112,8 @@ for m in module_names:
|
||||
with zipfile.ZipFile(tmpdir.joinpath(f)) as zipFile:
|
||||
zipFile.extractall(target_dir)
|
||||
|
||||
# Just capture the artifacts, not the bp files of finalized versions
|
||||
os.remove(target_dir.joinpath('Android.bp'))
|
||||
# Disable the Android.bp, but keep it for reference / potential future use.
|
||||
shutil.move(target_dir.joinpath('Android.bp'), target_dir.joinpath('Android.bp.auto'))
|
||||
|
||||
print('Created %s' % target_dir)
|
||||
created_dirs[repo].add(dir)
|
||||
|
||||
Reference in New Issue
Block a user