@@ -10,11 +10,9 @@ USER root
10
10
# Google Chrome
11
11
# ============================================
12
12
# can specify versions by CHROME_VERSION;
13
- # e.g. google-chrome-stable=53.0.2785.101-1
14
- # google-chrome-beta=53.0.2785.92-1
15
- # google-chrome-unstable=54.0.2840.14-1
16
- # latest (equivalent to google-chrome-stable)
17
- # google-chrome-beta (pull latest beta)
13
+ # e.g. google-chrome-stable
14
+ # google-chrome-beta
15
+ # google-chrome-unstable
18
16
# ============================================
19
17
ARG CHROME_VERSION="google-chrome-stable"
20
18
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
@@ -45,8 +43,9 @@ RUN if [ ! -z "$CHROME_DRIVER_VERSION" ]; \
45
43
else echo "Geting ChromeDriver binary from https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json" \
46
44
&& CFT_URL=https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json \
47
45
&& CFT_CHANNEL="Stable" \
48
- && if [[ $CHROME_VERSION == *"beta" * ]]; then CFT_CHANNEL="Beta" ; fi \
49
- && if [[ $CHROME_VERSION == *"unstable" * ]]; then CFT_CHANNEL="Dev" ; fi \
46
+ && if [ "$CHROME_VERSION" = "google-chrome-beta" ]; then CFT_CHANNEL="Beta" ; fi \
47
+ && if [ "$CHROME_VERSION" = "google-chrome-unstable" ]; then CFT_CHANNEL="Dev" ; fi \
48
+ && echo $CFT_CHANNEL \
50
49
&& CTF_VALUES=$(curl -sSL $CFT_URL | jq -r --arg CFT_CHANNEL "$CFT_CHANNEL" '.channels[] | select (.channel==$CFT_CHANNEL)' ) \
51
50
&& CHROME_DRIVER_VERSION=$(echo $CTF_VALUES | jq -r '.version' ) \
52
51
&& CHROME_DRIVER_URL=$(echo $CTF_VALUES | jq -r '.downloads.chromedriver[] | select(.platform=="linux64") | .url' ) ; \
0 commit comments