Two important notes: 1. The time it takes to download is negligble compared to e2e test runs 2. Since we cannot use environment variables in CircleCI cache keys we can't cache the download correctly and have it update when we switch firefox versions—this isn't the end of the world because of point 1feature/default_network_editable
parent
c7f5436143
commit
e493efb123
@ -1,13 +0,0 @@ |
|||||||
#!/usr/bin/env bash |
|
||||||
echo "Checking if firefox was already downloaded" |
|
||||||
if [ -d "firefox" ] |
|
||||||
then |
|
||||||
echo "Firefox found. No need to download" |
|
||||||
else |
|
||||||
FIREFOX_VERSION="61.0.1" |
|
||||||
FIREFOX_BINARY="firefox-$FIREFOX_VERSION.tar.bz2" |
|
||||||
echo "Downloading firefox..." |
|
||||||
wget "https://ftp.mozilla.org/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/$FIREFOX_BINARY" \ |
|
||||||
&& tar xjf "$FIREFOX_BINARY" |
|
||||||
echo "firefox download complete" |
|
||||||
fi |
|
@ -0,0 +1,19 @@ |
|||||||
|
#!/usr/bin/env bash |
||||||
|
|
||||||
|
set -e |
||||||
|
set -u |
||||||
|
set -o pipefail |
||||||
|
|
||||||
|
FIREFOX_VERSION='61.0.1' |
||||||
|
FIREFOX_BINARY="firefox-${FIREFOX_VERSION}.tar.bz2" |
||||||
|
FIREFOX_BINARY_URL="https://ftp.mozilla.org/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/${FIREFOX_BINARY}" |
||||||
|
|
||||||
|
printf '%s\n' "Removing old Firefox installation" |
||||||
|
|
||||||
|
sudo rm -r /opt/firefox |
||||||
|
|
||||||
|
printf '%s\n' "Downloading & installing Firefox ${FIREFOX_VERSION}" |
||||||
|
|
||||||
|
wget --quiet --show-progress -O- "${FIREFOX_BINARY_URL}" | sudo tar xj -C /opt |
||||||
|
|
||||||
|
printf '%s\n' "Firefox ${FIREFOX_VERSION} installed" |
@ -1,8 +0,0 @@ |
|||||||
#!/usr/bin/env bash |
|
||||||
|
|
||||||
echo "Installing firefox..." |
|
||||||
sudo rm -r /opt/firefox |
|
||||||
sudo mv firefox /opt/firefox61 |
|
||||||
sudo mv /usr/bin/firefox /usr/bin/firefox-old |
|
||||||
sudo ln -s /opt/firefox61/firefox /usr/bin/firefox |
|
||||||
echo "Firefox installed." |
|
Loading…
Reference in new issue