devops: fix checking if branch is tip-of-tree when publishing @next (#1926)

This should fix publishing @next from release branches.
This commit is contained in:
Andrey Lushnikov 2020-04-22 17:02:38 -07:00 committed by GitHub
parent 53c78a8a29
commit 511883d3f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,7 +54,7 @@ elif [[ $1 == "--tip-of-tree" ]]; then
fi
# Ensure this is actually tip-of-tree.
UPSTREAM_SHA=$(git ls-remote https://github.com/microsoft/playwright --tags master | cut -f1)
UPSTREAM_SHA=$(git ls-remote https://github.com/microsoft/playwright --tags $(git rev-parse --abbrev-ref HEAD) | cut -f1)
CURRENT_SHA=$(git rev-parse HEAD)
if [[ "${UPSTREAM_SHA}" != "${CURRENT_SHA}" ]]; then
echo "REFUSING TO PUBLISH: this is not tip-of-tree"