This repository was archived by the owner on Jun 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -40,15 +40,10 @@ USER 1200
4040ARG CHROME_DRIVER_VERSION
4141RUN if [ ! -z "$CHROME_DRIVER_VERSION" ]; \
4242 then CHROME_DRIVER_URL=https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$CHROME_DRIVER_VERSION/linux64/chromedriver-linux64.zip ; \
43- else echo "Geting ChromeDriver binary from https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json" \
44- && CFT_URL=https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json \
45- && CFT_CHANNEL="Stable" \
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 \
49- && CTF_VALUES=$(curl -sSL $CFT_URL | jq -r --arg CFT_CHANNEL "$CFT_CHANNEL" '.channels[] | select (.channel==$CFT_CHANNEL)' ) \
50- && CHROME_DRIVER_VERSION=$(echo $CTF_VALUES | jq -r '.version' ) \
51- && CHROME_DRIVER_URL=$(echo $CTF_VALUES | jq -r '.downloads.chromedriver[] | select(.platform=="linux64") | .url' ) ; \
43+ else echo "Geting ChromeDriver latest version from https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_" \
44+ && CHROME_MAJOR_VERSION=$(google-chrome --version | sed -E "s/.* ([0-9]+)(\. [0-9]+){3}.*/\1 /" ) \
45+ && CHROME_DRIVER_VERSION=$(wget -qO- https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_${CHROME_MAJOR_VERSION} | sed 's/\r $//' ) \
46+ && CHROME_DRIVER_URL=https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$CHROME_DRIVER_VERSION/linux64/chromedriver-linux64.zip ; \
5247 fi \
5348 && echo "Using ChromeDriver from: " $CHROME_DRIVER_URL \
5449 && echo "Using ChromeDriver version: " $CHROME_DRIVER_VERSION \
You can’t perform that action at this time.
0 commit comments