fix: content hash check for LUCI_CONTEXT (#176867)

When running on LUCI, the environment variable is LUCI_CONTEXT

fixes: #176838
This commit is contained in:
John "codefu" McDole 2025-10-10 20:30:16 -07:00 committed by GitHub
parent fa3ec5f88e
commit 4e8e4a95fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ if (($currentBranch -ne "main") -and
($currentBranch -ne "master") -and
($currentBranch -ne "stable") -and
($currentBranch -ne "beta") -and
(-not (($currentBranch -eq "HEAD") -and (-not [string]::IsNullOrEmpty($env:LUCI_CI)))) -and
(-not (($currentBranch -eq "HEAD") -and (-not [string]::IsNullOrEmpty($env:LUCI_CONTEXT)))) -and
(-not $currentBranch.StartsWith("gh-readonly-queue/master/pr-")) -and
(-not ($currentBranch -like "flutter-*-candidate.*")) -and
(-not $isShallow)) {

View File

@ -44,7 +44,7 @@ if [[ "$CURRENT_BRANCH" != "main" && \
"$CURRENT_BRANCH" != "beta" && \
"$CURRENT_BRANCH" != "gh-readonly-queue/master/pr-"* && \
"$CURRENT_BRANCH" != "flutter-"*"-candidate."* && \
! ( "$CURRENT_BRANCH" == "HEAD" && -n "$LUCI_CI" ) && \
! ( "$CURRENT_BRANCH" == "HEAD" && -n "$LUCI_CONTEXT" ) && \
! -f "$FLUTTER_ROOT/.git/shallow" ]]; then
# This is a development branch. Find the merge-base.

View File

@ -231,7 +231,7 @@ void main() {
);
// Simulate being in a LUCI environment.
environment['LUCI_CI'] = 'true';
environment['LUCI_CONTEXT'] = 'true';
expect(runContentAwareHash(), processStdout('63a6c6dc494d9a2fc3e78e8505e878d129429246'));
});