diff options
author | Anton Hansson <hansson@google.com> | 2022-04-29 11:11:35 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2022-04-29 11:11:35 +0000 |
commit | 52ef4e0e12eb21d3fc2dac0f99a0ba442a177b3f (patch) | |
tree | ee17de0897bf36226dcd784467e4dfb943b12260 | |
parent | f899a2c248d38f37050161d9afb8bc978c950ed0 (diff) | |
parent | f258d0368f74085681b76a19aeb2ac6e5c714685 (diff) | |
download | common-52ef4e0e12eb21d3fc2dac0f99a0ba442a177b3f.tar.gz |
Merge "Address review comments on finalize_sdk.py" into tm-dev
-rwxr-xr-x | tools/finalize_sdk.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/finalize_sdk.py b/tools/finalize_sdk.py index 84fd762e..c045295e 100755 --- a/tools/finalize_sdk.py +++ b/tools/finalize_sdk.py @@ -90,9 +90,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(): @@ -112,8 +110,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) |