Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 86b3621

Browse files
authored
[ci] Update Chrome install script and version. (#5098)
1 parent 8624a5f commit 86b3621

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

script/install_chromium.sh

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,35 @@ readonly TARGET_DIR=$1
1010
# The build of Chromium used to test web functionality.
1111
#
1212
# Chromium builds can be located here: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_x64/
13-
readonly CHROMIUM_BUILD=768968
14-
# The ChromeDriver version corresponding to the build above. See
15-
# https://chromedriver.chromium.org/downloads
16-
# for versions mappings when updating Chromium.
17-
readonly CHROME_DRIVER_VERSION=84.0.4147.30
13+
#
14+
# Check: https://github.com/flutter/engine/blob/master/lib/web_ui/dev/browser_lock.yaml
15+
readonly CHROMIUM_BUILD=929514
16+
17+
# The correct ChromeDriver is distributed alongside the chromium build above, as
18+
# `chromedriver_linux64.zip`, so no need to hardcode any extra info about it.
19+
readonly DOWNLOAD_ROOT="https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F${CHROMIUM_BUILD}%2F"
1820

1921
# Install Chromium.
2022
mkdir "$TARGET_DIR"
21-
wget --no-verbose "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F${CHROMIUM_BUILD}%2Fchrome-linux.zip?alt=media" -O "$TARGET_DIR"/chromium.zip
22-
unzip "$TARGET_DIR"/chromium.zip -d "$TARGET_DIR"/
23+
readonly CHROMIUM_ZIP_FILE="$TARGET_DIR/chromium.zip"
24+
wget --no-verbose "${DOWNLOAD_ROOT}chrome-linux.zip?alt=media" -O "$CHROMIUM_ZIP_FILE"
25+
unzip -q "$CHROMIUM_ZIP_FILE" -d "$TARGET_DIR/"
2326

2427
# Install ChromeDriver.
2528
readonly DRIVER_ZIP_FILE="$TARGET_DIR/chromedriver.zip"
26-
wget --no-verbose "https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip" -O "$DRIVER_ZIP_FILE"
27-
unzip "$DRIVER_ZIP_FILE" -d "$TARGET_DIR/chromedriver"
29+
wget --no-verbose "${DOWNLOAD_ROOT}chromedriver_linux64.zip?alt=media" -O "$DRIVER_ZIP_FILE"
30+
unzip -q "$DRIVER_ZIP_FILE" -d "$TARGET_DIR/"
31+
# Rename TARGET_DIR/chromedriver_linux64 to the expected TARGET_DIR/chromedriver
32+
mv -T "$TARGET_DIR/chromedriver_linux64" "$TARGET_DIR/chromedriver"
33+
34+
export CHROME_EXECUTABLE="$TARGET_DIR/chrome-linux/chrome"
2835

2936
# Echo info at the end for ease of debugging.
30-
export CHROME_EXECUTABLE="$TARGET_DIR"/chrome-linux/chrome
31-
echo $CHROME_EXECUTABLE
32-
$CHROME_EXECUTABLE --version
33-
echo "ChromeDriver $CHROME_DRIVER_VERSION"
37+
set +x
38+
echo
39+
readonly CHROMEDRIVER_EXECUTABLE="$TARGET_DIR/chromedriver/chromedriver"
40+
echo "$CHROME_EXECUTABLE"
41+
"$CHROME_EXECUTABLE" --version
42+
echo "$CHROMEDRIVER_EXECUTABLE"
43+
"$CHROMEDRIVER_EXECUTABLE" --version
44+
echo

0 commit comments

Comments
 (0)