build-unit-test-docker: support 'main' branches
Enhance the auto-rev code to support main branches.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ic9d32b5d4e4cb8e18c394d91b2a55ce010a41270
diff --git a/scripts/build-unit-test-docker b/scripts/build-unit-test-docker
index c81f965..a7eb4fb 100755
--- a/scripts/build-unit-test-docker
+++ b/scripts/build-unit-test-docker
@@ -431,7 +431,9 @@
for line in lookup.split("\n"):
if f"refs/heads/{branch}" in line:
self.pkg_def["rev"] = line.split()[0]
- elif f"refs/heads/master" in line and "rev" not in self.pkg_def:
+ elif (
+ "refs/heads/master" in line or "refs/heads/main" in line
+ ) and "rev" not in self.pkg_def:
self.pkg_def["rev"] = line.split()[0]
Package.lock.release()