mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
devops: fix prepare_checkout script (#14198)
Instead of checking repository for the existance of a commit sha, we should make sure that our remote branch has the commit. Otherwise, the `export.sh` script later on would not work!
This commit is contained in:
parent
9159ceafb5
commit
0d2583f0d3
@ -189,8 +189,8 @@ else
|
||||
git remote rename origin $REMOTE_BROWSER_UPSTREAM
|
||||
fi
|
||||
|
||||
# Check if our checkout contains BASE_REVISION.
|
||||
if ! git cat-file -e "$BASE_REVISION"^{commit} 2>/dev/null; then
|
||||
# if our remote branch does not contains "BASE_REVISION" - then fetch more stuff.
|
||||
if [[ -z $(git branch -r --contains "${BASE_REVISION}" --list "${REMOTE_BROWSER_UPSTREAM}/${BASE_BRANCH}") ]]; then
|
||||
# Detach git head so that we can fetch into branch.
|
||||
git checkout --detach >/dev/null 2>/dev/null
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user