diff options
author | Gurpreet Singh <gurpreetgs@google.com> | 2024-03-26 00:17:32 +0000 |
---|---|---|
committer | Gurpreet Singh <gurpreetgs@google.com> | 2024-03-26 17:04:25 +0000 |
commit | a834c26d94084ca3ed392bc4158757953ec9a66a (patch) | |
tree | dc73bd92bb960666869216a512fc613baadb420e | |
parent | c6354c4494a398f70e3551a3da908688ae705300 (diff) | |
download | common-a834c26d94084ca3ed392bc4158757953ec9a66a.tar.gz |
Add release_config flag to finalize_sdk
Add a new release_config flag to finalize_sdk script to correct the
build target for git_main branches.
The flag is optional.
Bug: 321970705
Test: packages/modules/common/tools/finalize_sdk.py -f 12 -b 256848771 -rc mainline -r 'Testing' -m com.google.android.adservices -m com.google.android.mediaprovider 11609273
Change-Id: I7d54eea799cc9be968976d07fb2fd5f587c71502
-rwxr-xr-x | tools/finalize_sdk.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/finalize_sdk.py b/tools/finalize_sdk.py index 30c43a3a..15d319ac 100755 --- a/tools/finalize_sdk.py +++ b/tools/finalize_sdk.py @@ -22,6 +22,7 @@ COMPAT_README = Path('extensions/README.md') BUILD_TARGET_TRAIN = 'train_build' # This build target is used when fetching from a non-train build (XXXXXXXX) BUILD_TARGET_CONTINUOUS = 'mainline_modules_sdks-userdebug' +BUILD_TARGET_CONTINUOUS_MAIN = 'mainline_modules_sdks-{release_config}-userdebug' # The glob of sdk artifacts to fetch from remote build ARTIFACT_PATTERN = 'mainline-sdks/for-next-build/current/{module_name}/sdk/*.zip' # The glob of sdk artifacts to fetch from local build @@ -113,6 +114,7 @@ if not os.path.isdir('build/soong'): parser = argparse.ArgumentParser(description=('Finalize an extension SDK with prebuilts')) parser.add_argument('-f', '--finalize_sdk', type=int, required=True, help='The numbered SDK to finalize.') +parser.add_argument('-c', '--release_config', type=str, help='The release config to use to finalize.') parser.add_argument('-b', '--bug', type=int, required=True, help='The bug number to add to the commit message.') parser.add_argument('-r', '--readme', required=True, help='Version history entry to add to %s' % (COMPAT_REPO / COMPAT_README)) parser.add_argument('-a', '--amend_last_commit', action="store_true", help='Amend current HEAD commits instead of making new commits.') @@ -121,6 +123,8 @@ parser.add_argument('-l', '--local_mode', action="store_true", help='Local mode: parser.add_argument('bid', help='Build server build ID') args = parser.parse_args() +if args.release_config: + BUILD_TARGET_CONTINUOUS = BUILD_TARGET_CONTINUOUS_MAIN.format(release_config=args.release_config) build_target = BUILD_TARGET_TRAIN if args.bid[0] == 'T' else BUILD_TARGET_CONTINUOUS branch_name = 'finalize-%d' % args.finalize_sdk cmdline = shlex.join([x for x in sys.argv if x not in ['-a', '--amend_last_commit', '-l', '--local_mode']]) |