Fix chromium revision parsing (#6182)

This commit is contained in:
Aleksandr Chebotov
2022-09-05 12:54:06 +02:00
committed by GitHub
parent ef9c8bf522
commit f1abfa5fde

View File

@@ -17,7 +17,7 @@ function GetChromiumRevision {
# Some Google Chrome versions are based on Chromium revisions for which a (usually very old) Chromium release with the same number exist. So far this has heppened with 4 digits long Chromium revisions (1060, 1086).
# Use the previous Chromium release when this happens to avoid downloading and installing very old Chromium releases that would break image build because of incompatibilities.
# First reported with: https://github.com/actions/runner-images/issues/5256
if [ ${#REVISION} -eq 4 ]; then
if [ ${#REVISION} -le 4 ]; then
CURRENT_REVISIONS=$(curl -s "https://omahaproxy.appspot.com/all.json?os=linux&channel=stable")
PREVIOUS_VERSION=$(echo "$CURRENT_REVISIONS" | jq -r '.[].versions[].previous_version')
URL="https://omahaproxy.appspot.com/deps.json?version=${PREVIOUS_VERSION}"