Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry pick PR #2013: Accept Git trailer Build-Id #2020

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cobalt/build/build_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
FILE_DIR = os.path.dirname(__file__)
COMMIT_COUNT_BUILD_ID_OFFSET = 1000000

_BUILD_ID_PATTERN = '^BUILD_NUMBER=([1-9][0-9]{6,})$'
_BUILD_ID_PATTERN = '^(Build-Id: |BUILD_NUMBER=)([1-9][0-9]{6,})$'
_GIT_REV_PATTERN = '^GitOrigin-RevId: ([0-9a-f]{40})$'
_COBALT_VERSION_PATTERN = '^#define COBALT_VERSION "(.*)"$'

Expand All @@ -40,7 +40,7 @@ def get_build_id_and_git_rev_from_commits(cwd):
match_build_id = compiled_build_id_pattern.search(output)
if not match_build_id:
return None, None
build_id = match_build_id.group(1)
build_id = match_build_id.group(2)

# Gets git rev.
compiled_git_rev_pattern = re.compile(_GIT_REV_PATTERN, flags=re.MULTILINE)
Expand Down
Loading