Skip to content

Commit 1e19f7d

Browse files
navilperezLUCI
authored andcommitted
sync: include TARGET_RELEASE when constructing smart sync target.
When using the smart sync option, we try to construct the target that was "lunched" from the TARGET_PRODUCT and TARGET_BUILD_VARIANT envvars. However, an android target is now made of three parts, {TARGET_PRODUCT}-{TARGET_RELEASE}-{TARGET_BUILD_VARIANT}. I am leaving the option of creating a target if a TARGET_RELEASE is not specified in case there are other consumers who depend on that option. BUG=b:358101714 TEST=./run_tests TEST=smart sync on android repo and manually inspecting smart_sync_override.xml Change-Id: I556137e33558783a86a0631f29756910b4a93d92 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/436977 Tested-by: Yiwei Zhang <[email protected]> Reviewed-by: Yiwei Zhang <[email protected]> Commit-Queue: Yiwei Zhang <[email protected]>
1 parent d8b4101 commit 1e19f7d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

subcmds/sync.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,6 +1496,19 @@ def _SmartSyncSetup(self, opt, smart_sync_manifest_path, manifest):
14961496
[success, manifest_str] = server.GetApprovedManifest(
14971497
branch, target
14981498
)
1499+
elif (
1500+
"TARGET_PRODUCT" in os.environ
1501+
and "TARGET_BUILD_VARIANT" in os.environ
1502+
and "TARGET_RELEASE" in os.environ
1503+
):
1504+
target = "%s-%s-%s" % (
1505+
os.environ["TARGET_PRODUCT"],
1506+
os.environ["TARGET_RELEASE"],
1507+
os.environ["TARGET_BUILD_VARIANT"],
1508+
)
1509+
[success, manifest_str] = server.GetApprovedManifest(
1510+
branch, target
1511+
)
14991512
elif (
15001513
"TARGET_PRODUCT" in os.environ
15011514
and "TARGET_BUILD_VARIANT" in os.environ

0 commit comments

Comments
 (0)