Skip to content
Permalink
Browse files

bootstrap.sh: Cache common hosts in /etc/hosts

This may help work around the intermittent Travis CI DNS outages.

Closes: https://trac.macports.org/ticket/60614
  • Loading branch information
ryandesign committed Jun 29, 2020
1 parent e654601 commit ad4012140f2632b39492994aad5ab55983dc7d50
Showing with 5 additions and 0 deletions.
  1. +5 −0 _ci/bootstrap.sh
@@ -5,6 +5,11 @@ set -e
brew --version
/usr/bin/sudo /usr/bin/find /usr/local -mindepth 2 -delete && hash -r

# Guard against intermittent Travis CI DNS outages
for host in distfiles.macports.org github.com packages.macports.org packages-private.macports.org; do
dig +short "$host" | sed -n '$s/$/ '"$host/p" | sudo tee -a /etc/hosts
done

# Download and install MacPorts built by https://github.com/macports/macports-base/blob/travis-ci/.travis.yml
OS_MAJOR=$(uname -r | cut -f 1 -d .)
curl -fsSLO "https://dl.bintray.com/macports-ci-bot/macports-base/2.6r0/MacPorts-${OS_MAJOR}.tar.bz2"

0 comments on commit ad40121

Please sign in to comment.
You can’t perform that action at this time.