Skip to content

Commit a76b1f4

Browse files
committed
jibri: simplify ChromeDriver download
1 parent fd1c308 commit a76b1f4

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

jibri/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ LABEL org.opencontainers.image.documentation="https://jitsi.github.io/handbook/"
1111
ARG TARGETPLATFORM
1212
ARG USE_CHROMIUM=0
1313
#ARG CHROME_RELEASE=latest
14-
#ARG CHROMEDRIVER_MAJOR_RELEASE=latest
14+
# https://googlechromelabs.github.io/chrome-for-testing/
1515
ARG CHROME_RELEASE=116.0.5845.96
16-
ARG CHROMEDRIVER_MAJOR_RELEASE=116
1716

1817
COPY rootfs/ /
1918

jibri/rootfs/usr/bin/install-chrome.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ else
2121

2222
google-chrome --version
2323

24-
if [ "${CHROMEDRIVER_MAJOR_RELEASE}" = "latest" ]; then
25-
CHROMEDRIVER_RELEASE="$(curl -4Ls https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_STABLE)"
24+
BASE_URL=https://googlechromelabs.github.io/chrome-for-testing
25+
26+
if [ "${CHROME_RELEASE}" = "latest" ]; then
27+
CHROMEDRIVER_RELEASE="$(curl -4Ls ${BASE_URL}/LATEST_RELEASE_STABLE)"
2628
else
27-
CHROMEDRIVER_RELEASE="$(curl -4Ls https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_${CHROMEDRIVER_MAJOR_RELEASE})"
29+
CHROMEDRIVER_MAJOR_RELEASE=$(echo $CHROME_RELEASE | cut -d. -f1)
30+
CHROMEDRIVER_RELEASE="$(curl -4Ls ${BASE_URL}/LATEST_RELEASE_${CHROMEDRIVER_MAJOR_RELEASE})"
2831
fi
2932

3033
CHROMEDRIVER_ZIP="/tmp/chromedriver_linux64.zip"

0 commit comments

Comments
 (0)